xsl-list
[Top] [All Lists]

[xsl] Matching a local scope name

2010-09-15 07:16:46
Are there any suggestions, "best" or otherwise for matching a particular local scope name without matching the global scope name or other local scoped names of the same name ?
Suppose I have an XSD which defines   "title" in 3 places.
Globally, as a local scope under "/section" and a local scope under "master/section"

Suppose I want a template to just match the later

<template match="section">

Would match all three (?)

<template match="master/section" >
might do the trick but suppose there is another "master" locally defined elsewhere that I DONT want to match.

Is there general advise in this area ?
As contesxt, I'm trying to generate an XSLT from the XSD file so I dont have access to an instance document, only the XSD type information ... so I'd like to be able to map any XSElementDeclaration to a template rule somehow.
The above is only one path I've considered.
Would a schema aware XSLT 2 processor help ? Is there a way to add type matching to the selection criteria of XSLT templates ?

Thanks for any suggestions

--
David A. Lee
dlee(_at_)calldei(_dot_)com
http://www.xmlsh.org


--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>