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 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Max HodgesSubject: Problem with attribute-sets, maybe bug?
Author: Max Hodges
Date: 26 Apr 2002 01:24 AM
I have an XSLT that includes a library.xsl. In this library file I define some attribute-sets. When I run my xsl using the SS processor, some use-attribute-sets statements work, but one that is nested in a called template doesn't. Why?

Also, if I run it from MSXML, none of the use-attribute-sets statements work. I'm confused. Who is out of spec? or is the spec ambigious? I need a working solution with MSXML.


Documentattrib_set.zip
ss project file set

Postnext
(Deleted User) Subject: Re: Problem with attribute-sets, maybe bug?
Author: (Deleted User)
Date: 26 Apr 2002 05:33 AM
At 01.36 26/04/2002 -0400, you wrote:
>From: "Max Hodges"
>
>I have an XSLT that includes a library.xsl. In this library file I define
>some attribute-sets. When I run my xsl using the SS processor, some
>use-attribute-sets statements work, but one that is nested in a called
>template doesn't. Why?

The use-attribute-sets in the //link template does work (the output shows
'font color=""' so it has been expanded) but it's the query that fails.
This because the template is called using

xsl:apply-templates
select="document($ref_doc_path)//external_links/link[position() mod 3 = 1]"

that makes the document context be the ref2.xml file; so the query
//color[@id=2] specified by the attribute-set will not find any definition.
A possible solution (not very library-friendly, however) would be to change
the query to be document('test.xml')//color[@id=2]


>Also, if I run it from MSXML, none of the use-attribute-sets statements
>work. I'm confused. Who is out of spec? or is the spec ambigious? I need a
>working solution with MSXML.

There is an error in the test.xsl stylesheet: the "font" elements have an
"use-attribute-sets" attribute instead of "xsl:use-attribute-sets". In this
case, Stylus is not following the specs by not checking that the attribute
is in the XSLT namespace.

Alberto

Posttop
Max HodgesSubject: Re: Problem with attribute-sets, maybe bug?
Author: Max Hodges
Date: 26 Apr 2002 06:20 AM
THANK YOU SO MUCH! I was making great progress on my project, and then I just hit a wall with these attribute issues. Excellent work on your part. I really appreciate it!

 
Topic Page 1 2 3 4 5 6 7 8 9 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.