XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Adam Van den HovenSubject: An Error in the interpretation of the XSLT Rec?
Author: Adam Van den Hoven
Date: 26 Sep 2002 05:39 PM
Good afternoon!

I think I found a problem with the way that Stylus Studio (and possibly the rest of the universe) has interpreted part of XSLT recommendation.

Quoting from: http://www.w3.org/TR/xslt#modes

"... The value of the mode attribute is a QName, which is expanded as described in [2.4 Qualified Names]. ..."

And from: http://www.w3.org/TR/xslt#qname

"If it has a prefix, then the prefix is expanded into a URI reference using the namespace declarations in effect on the attribute in which the name occurs. The expanded-name consisting of the local part of the name and the possibly null URI reference is used as the name of the object."

I have encountered a very interesting problem related to this. I want to refer to nodes using a namespace qualified value. So I include a namespace attribute in the stylesheet element and then use names in that namespace in my mode values. Everything works fine until I import a stylesheet that uses the same namespace for its modes but different prefixes. In this case it fails. I'll attach an example of something that doesn't work.

The long and short of it is that:
{apply-templates select="*" mode="x:mode1" xmlns:x="http://www.x.com/schema/" /}

will not use this templates:

{template match="*" mode="y:mode1" xmlns:y="http://www.x.com/schema/" /}

Which, as far as I can tell, is wrong.

Any Thoughts?

Adam


Applicationincl2.xsl
2nd include

Documentmain.xsl
Main transform (use any src)

Documentincl1.xsl
1st Include

Posttop
Minollo I.Subject: An Error in the interpretation of the XSLT Rec?
Author: Minollo I.
Date: 27 Sep 2002 11:59 AM
This problem is now fixed in BL100j, available from:
http://www.stylusstudio.com/update (4.0 update section)
and
http://www.stylusstudio.com/beta (4.5 beta)

Thanks for reporting this,
Minollo

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.