Examples of CDATASection


Examples of org.w3c.dom.CDATASection

                        if (spaceIndex != -1)
                        {
                            desc = desc.substring(spaceIndex + 1);
                        }
                        Element apiDesc = outputObject.createElement("apiDesc");
                        CDATASection cdata = outputObject.createCDATASection(asDocUtil.validateText(desc, "param", record.getAttribute("fullname")));
                        apiDesc.appendChild(cdata);
                        apiParam.appendChild(apiDesc);

                        asDocUtil.convertDescToDITA(apiDesc, oldNewNamesMap);

                        params.appendChild(apiParam);
                        paramFound = true;
                    }
                }
                else if (tagName.equals("param"))
                {
                }
                else if (tagName.equals("includeExample"))
                {
                    includeExamplesFound = true;

                    // get the <example> element after reading the file and
                    // creating a <codeblock>
                    // add the <example> to the detail node..
                    includeExamples.add(processIncludeExampleTag(record.getAttribute("fullname"), child.getTextContent()));
                }
                else if (tagName.equals("tiptext"))
                {
                    tipTextFound = true;

                    Element apiTipText = outputObject.createElement("apiTipText");
                    CDATASection cdata = outputObject.createCDATASection(asDocUtil.validateText(child.getTextContent(), "tiptext", record.getAttribute("fullname")));
                    apiTipText.appendChild(cdata);
                    asDocUtil.convertDescToDITA(apiTipText, oldNewNamesMap);
                    apiTipTexts.appendChild(apiTipText);
                }
                else if (tagName.equals("copy"))
                {
                    String copyRef = child.getTextContent();
                    copyRef = copyRef.replaceAll("[\\n\\s]", "");

                    if (copyRef.equals(""))
                    {
                        continue;
                    }

                    Element shortDescElement = asDocUtil.getElementByTagName(target, "shortdesc");
                    if (shortDescElement == null)
                    {
                        shortDescElement = outputObject.createElement("shortdesc");
                        target.appendChild(shortDescElement);
                    }

                    shortDescElement.setAttribute("conref", copyRef);
                    Element detailNode = asDocUtil.getDetailNode(target);

                    if (detailNode == null)
                    {
                        continue;
                    }

                    Element apiDesc = asDocUtil.getElementImmediateChildByTagName(detailNode, "apiDesc");

                    if (apiDesc != null)
                    {
                        apiDesc.setAttribute("conref", copyRef);
                    }
                }
                else if (tagName.equals("default"))
                {

                    Element apiDefaultValue = outputObject.createElement("apiDefaultValue");
                    apiDefaultValue.setTextContent(child.getTextContent());
                    Element defNode = asDocUtil.getDefNode(target);
                    defNode.appendChild(apiDefaultValue);
                }
                else if (tagName.equals("inheritDoc"))
                {

                    Element apiInheritDoc = outputObject.createElement("apiInheritDoc");
                    target.appendChild(apiInheritDoc);
                }
                else
                {
                    customsFound = true;
                    customData = outputObject.createElement(child.getNodeName());
                    NodeList customsChildren = child.getChildNodes();
                    if (customsChildren != null && customsChildren.getLength() != 0)
                    {
                        if (customsChildren.item(0).getNodeType() == Node.CDATA_SECTION_NODE)
                        {
                            CDATASection cdata = outputObject.createCDATASection(child.getTextContent());
                            cdata.setData(((CDATASection)customsChildren.item(0)).getData());
                            customData.appendChild(cdata);
                        }
                        else
                        {
                            CDATASection cdata = outputObject.createCDATASection(child.getTextContent());
                            customData.appendChild(cdata);
                        }
                    }

                }
View Full Code Here

Examples of org.w3c.dom.CDATASection

                    }
                }
            }
            result = outputObject.createElement("example");
            result.setAttribute("conref", exampleFileName);
            CDATASection cdata = outputObject.createCDATASection(asDocUtil.validateText(output.toString(), "includeExample " + exampleStr, fullName));
            result.appendChild(cdata);
            // result.setTextContent(asDocUtil.validateText(output.toString()));
        }

        if (result == null)
View Full Code Here

Examples of org.w3c.dom.CDATASection

            NodeList descriptionList = ((Element)parent).getElementsByTagName("description");
            if (descriptionList != null && descriptionList.getLength() != 0)
            {
                fullDesc = descriptionList.item(0).getTextContent();
                Element apiDesc = outputObject.createElement("apiDesc");
                CDATASection cdata = outputObject.createCDATASection(asDocUtil.validateText(fullDesc, "description", fullName));
                apiDesc.appendChild(cdata);
                apiValueDetail.appendChild(apiDesc);
                asDocUtil.convertDescToDITA(apiDesc, oldNewNamesMap);
                shortdesc.setTextContent(asDocUtil.descToShortDesc(fullDesc));
            }

            children = ((Element)parent).getElementsByTagName("example");
            if (children != null)
            {
                for (int ix = 0; ix < children.getLength(); ix++)
                {
                    Element inputExampleElement = (Element)children.item(ix);

                    Element example = outputObject.createElement("example");

                    CDATASection cdata = outputObject.createCDATASection(asDocUtil.validateText(inputExampleElement.getTextContent(), "example", fullName));
                    example.appendChild(cdata);
                    apiValueDetail.appendChild(example);
                    asDocUtil.convertDescToDITA(example, oldNewNamesMap);
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.