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

Re: xsl:apply-templates - Specifying patterns

Subject: Re: xsl:apply-templates - Specifying patterns
From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx>
Date: Mon, 17 Dec 2001 11:20:42 +0200
xsl apply templates namespace
Ganesh Suriyanarayanan wrote:


Iam trying to write an XSL to get a XML Instance of a XSD schema file,
I need to search for a pattern apply template on that, like
<xsl:template match="complexType//sequence">


the source XSD can contain namespaces like
<xsd:complexType>
or
<xs:complexType>
or
<complexType>

how to write a generic patten match expression to handle this namespace
What do you mean as namespace is really just namespace prefix the only meaning of which is to point out at namespace URI.

So, you'd better declare schema namespaces in your stylesheet and use your own favorite prefix.
<xsl:stylesheet ... xmlns:xsd="http://www.w3.org/2001/XMLSchema">
...
<xsl:template match="xsd:complexType//xsd:sequence"


Such kind of pattern will match sequence elements in "http://www.w3.org/2001/XMLSchema" namespace despite of their namespace prefixes in the source document.


-- Oleg Tkachenko Multiconn International, Israel


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.