Subject: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.
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.
Subject: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!