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

RE: Default Namespace version problem

Subject: RE: Default Namespace version problem
From: "Michael Leditschke" <mike@xxxxxxxxxxx>
Date: Thu, 5 Dec 2002 14:11:52 +1100
RE:  Default Namespace version problem
> The reason that this is the case is if I set the default namespace to v2 
> then the stlyesheet won't transform the XML documents correctly (the output consists of just the text within the 
> elements, and nothing else). 

This behaviour suggests the inbuilt rules are coming into play, and
none of your templates are being invoked. Its important to remember
that default namespaces are ignored in the rules for patterns and
XPath expressions.


If you are attempting to match elements in your source XML that 
are in a particular namespace, you'll need to declare that namespace 
in your stylesheet and use it in the template rules e.g.

<xsl:template match="v1:someelement">

where you've declared v1 previously in the stylesheet, typically
on the stylesheet element, as

xmlns:v1="http://www.blah.com/test/v1"

To avoid having a declaration for v1 appearing in your stylesheet,
check out the exclude-result-prefixes attribute of the stylesheet
element.


Regards
Michael


 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.