|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








