Etienne --
This is not correct because you are not putting these elements into a
namespace. You need to use createElementNS to create an element in the
namespace.
Gary
Etienne Deleflie wrote:
>
> Hi,
>
> more on this dynamic XSL DOM document creation. Perhaps I am not creating the
> DOM document correctly (even though it prints out correctly)
>
> ........... I am setting both the attributes of the root node (version and
> xmlns:xsl)
>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> by doing the following
>
> // make a root node for the xml Document
> Element root = (Element) document.createElement("page");
> document.appendChild(root);
>
> // namespace and version
> Element xslRoot = (Element) stylesheet.createElement("xsl:stylesheet");
> xslRoot.setAttribute("version", "1.0");
> xslRoot.setAttribute("xmlns:xsl", "http://www.w3.org/1999/XSL/Transform");
>
> does this seem correct ?
>
> etienne