> Hi
>
> > My XSL has entries like these:
> >
> > <xsl:copy-of
> > select="xalan:nodeset(ext:generateSubtree())" />
> >
> > Where generateSubtree() is external Java class method and returns
> > result in
> > form of org.w3c.dom.NodeList and inside that nodes list I have
> > nodes like
> > <fo:page-number/> and whole XSL has such attribute specified:
> >
> > xmlns:fo="http://www.w3.org/1999/XSL/Format"
> >
> > Now when I run whole transformation process - I get:
> >
> > org.xml.sax.SAXException: Mismatch: page-number
> > (http://www.w3.org/1999/XSL/Format) vs. page-number ()
>
> This is weird... So, if I interpret correctly, the input
>
> <fo:page-number />
>
> leads to a SAX startElement() event *with* the proper namespace, but
> somewhere in between (by Xalan, I presume) the namespace dissolves so
> that null is passed to the endElement() event...
>
It turned out that if during NodeList (which will be retuned then to
xalan:nodelist()) creation inside my Java code I use just this call:
Element elem = xmlDoc.createElement("fo:something");
then later I get that SAXException, but if I use this call:
Element elem = xmlDoc.createElementNS("http://www.w3.org/1999/XSL/Format",
"fo:something");
then everything works correctly.
My initial thought was that "fo:" namespace defined on the top of xsl will
be automatically propagated (I use factory.setNamespaceAware(true) as well)
into tree fragment creation, but seems not by some reason.
Anyway, now I have that part working.
Thank you for your suggestions.
Andrejus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]