I need oto reference the external XSL file in my XML file
Adding a level 0 reference was not a problem...
DOMImplementationImpl domImplementationImpl = new
DOMImplementationImpl();
DocumentType xdocType =
domImplementationImpl.createDocumentType(sDTD,null,namespace.data.szDTD);
document = domImplementationImpl.createDocument("Publication", nil,
xdocType);
but here the problem begins i need to add a stylesheet reference on the same
level as the root node. so the generated file after the serialization looks
like this example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE mydoctype SYSTEM "mydoctype.dtd">
<?xml:stylesheet type="text/xsl" href="myxsl.xsl" ?>
<Rootnode>
<subnodes/>
</Rootnode>
the problem is the third line and it's localization in the DOM tree the
level equal to rootnode and DOCTYPE
i was experimenting with the ProcessingInstructions but the below
implementation simply does not work as the DOM document can only have one
root node
xslElement = document.createProcessingInstruction(
"xml:stylesheet",
"type=\"text/xsl\" href=\"" + namespace.data.szStylesheet+"\" ");
document.appendChild(xslElement);
Thanks in advance,
Adam Najmanowicz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]