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

RE: newbie problem - writing XSL for an XML with names

Subject: RE: newbie problem - writing XSL for an XML with namespaces.
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Tue, 3 Jul 2001 15:51:51 +0100
RE:  newbie problem - writing XSL for an XML with names
> Since we are likely to received files both with an without
> the namespace specified, I need to be able to display them
> with the same XSL in either case.
>
> So how can I process an incoming XML, without worrying about
> whether it's specified a namespace or not?

That's tricky: XSLT rather naively followed the design principles of
namespaces, which say that ABC in namespace N is completely unrelated to ABC
in namespace M, so why would you want to process both with the same logic?
Unfortunately you're not alone in using local names in two different
namespaces that actually have a strong relationship with each other, and I
know there's not much point telling you it's bad design.

An XSLT solution would make heavy use of things like
select=*[local-name()='ABC']; but my preference would be a SAX filter that
you apply before the stylesheet kicks in, to add the missing namespace
declarations.

Mike Kay
Software AG


 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.