xsl-list
[Top] [All Lists]

Re: [xsl] Matching a recursive local element structure

2011-02-05 08:23:15
On 05/02/2011 01:06, David Lee wrote:
Thanks for the ideas (all!)
Let me restate my question maybe it might lead to another idea  (I'm still
floundering !)

For every element declaration in an XSD I would like to generate a unique
XSLT match expression that matches that element declaration (but no others).

First, take any named complex types/groups etc and move them inline within the element declaration to which they refer. Then every element declaration is either a global element declaration E, in which case it matches the pattern schema-element(E), or it is a local element declaration within a schema declaration, in which case it matches a pattern such as schema-element(E)/F/G/H.

So, it can certainly be done with schema-aware patterns (unsurprisingly). Can it be done in all cases with patterns that are not schema-aware? I don't know - but why would you want to? Surely this is what schema-aware XSLT is designed for?

Michael Kay

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--