[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: IE does not comprehend default namespace in XML

Subject: Re: IE does not comprehend default namespace in XML
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Thu, 27 Aug 2009 09:26:01 +0200
Re:  IE does not comprehend default namespace in XML
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.