attribute in rule context - skeleton1-5.xslt bug?

"Benoit Maisonny" <[email protected]> Mon, 18 Aug 2003 15:23:45 +0100 (BST)
Newsgroups gmane.text.xml.schematron
Message-ID <[email protected]>
Hi,

I've been using Schematron (specifically, skeleton1-5.xslt) for a (short)
while and needed to have attributes in a rule context. To make it work, I
had to make the following changes to skeleton1-5.xslt:

(diff output follows)
-----------------------------------------------------------------------------
300c300,301
<                       <axsl:template match="text()" priority="-1"
mode="M{count(preceding-sibling::*)}">
---
>                       <!-- Added by BM: match and apply @* also -->
>                       <axsl:template match="text()|@*" priority="-1"
mode="M{count(preceding-sibling::*)}">
302a304,306
>                       <axsl:template match="*" priority="-1"
mode="M{count(preceding-sibling::*)}">
>                               <axsl:apply-templates select="node()|@*"
mode="M{count(preceding-sibling::*)}"/>
>                       </axsl:template>
323c327
<                       <axsl:apply-templates
mode="M{count(../preceding-sibling::*)}"/>
---
>                       <axsl:apply-templates select="node()|@*"
mode="M{count(../preceding-sibling::*)}"/>
-----------------------------------------------------------------------------

Now, this quick hack responds to my needs (though I don't claim it's the
best way to do it), but I am wondering why attributes were left out in the
first place. It doesn't seem like Schematron specs forbids <rule
context="@foo">... What am I missing?

I've read some discussions remotely related to this on a couple of other
lists but without a definitive answer.

Thanks for any insight,
Benoit


...................................................
Benoit Maisonny                [email protected]
Director & Consultant          http://synclude.com
Synclude Ltd.





-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01