denit thomas schrieb:
it does not render anyth= ing except the hardcoded text that I have in
the XSLT, when I have the xmln= s=3D"www.ncr.com/ocz" attribute in the
root node of the xml. As soon as I r= emove this attibute, it works
fine and the xslt gets applied.
It is a namespace issue. The xmlns looks like an attribute (and it is),
but namespace-aware XML parsers may not treat it like an attribute and
will treat it as a namespace declaration.
Any XML namespace tutorial will teach you the basics. It's not too
complicated.
So for developing/writing the xml, I need to keep the xmlns attribute
in the xml, while trying to render it using an xslt (defined in xml as
<?xml-stylesheet type="text/xsl" href="PIDRepresentation.xslt"?>), I
have to remove it from the xml.
No. Instead, add the namespace declaration to the XSL stylesheet.
<xsl:stylesheet version="1.0" xmlns:o="www.ncr.com/ocz" ...
And then use match="o:some-name" and select="o:some/o:other/o:name".
--
Michael Ludwig
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--