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

Re: Ignore namespaces

Subject: Re: Ignore namespaces
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 1 Jul 2002 14:27:34 +0100
xslt ignore namespace
Hi Andrew,

>>Unfortunately not in XSLT 1.0. As far as XPath and XSLT are
>>concerned, an element with a namespace is completely different from
>>an element without a namespace. To change an XSLT 1.0 stylesheet
>>from working over a source document without namespaces to one with,
>>you have to change every XPath that refers to elements that now have
>>a namespace, so that they include prefixes pointing to that
>>namespace.
>
> sorry to join thread half-way....
>
> Is it not possible to do an indentity transform first to remove the
> namespaces on the nodes, then apply the usual stylesheet?

Yes; that two-phase approach was the second approach that Fillipe
suggested and I discussed. As I said, and as you've shown, it isn't
hard to filter out namespaces using XSLT, but (a) you can't do that in
a single stylesheet unless you're prepared to use a node-set()
extension function and (b) you have to be aware that this changes the
underlying meaning of the XML document (it's the same as doing some
preprocessing to change all the 'foo' elements to 'bar' elements in
order to make the processing easier). There's nothing inherently wrong
with that, but it does mean you lose information that might turn out
to be useful in the main transformation.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.