Re: [xsl] use-when attribute?

Subject: Re: [xsl] use-when attribute?
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Sat, 18 Dec 2004 10:34:26 -0500
On Dec 18, 2004, at 9:16 AM, Michael Kay wrote:

or equivalently

/doctype1//@citation1,
/doctype2//@citation2

Ah ha ... that's what I was looking for! It even seems to be faster (at least on my small test doc) than the other approaches.


Thanks!

Just a quick clarification. Using this new xpath 2 feature, the processor will simply look for the first matching example? So that if the cite:* code can be embedded in different schemas, I can do this without as performance hit when using the document types preceding it in the list?

  <xsl:variable name="citerefs" select="/db:article//@linkend,
                    /db:book//@linkend,
                    /db:chapter//@linkend,
                    //cite:biblioref/@cite:key"/>

Of course, a schema-aware processor could in principle do this optimization
for you ...

For those willing to use XSD ;-)


Most of the schemas I'd be supporting (aside from WordML) are authored in RELAX NG.

Bruce

Current Thread