Sorry, Syd, I didn't complete my thought in enough detail.
At 2008-07-13 22:56 -0400, I wrote:
I've also included a solution that uses xml:lang= instead of lang=
since there are more semantics for xml:lang= ... for example, in the
third test the xml:lang= of the document is a subset of the
xml:lang= of the embedded content. I don't know if this will be of
help or not (in fact, it might be backwards from what you need and
not of any use).
XSLT has the lang(arg) function that returns true() if the inherited
xml:lang= language of the current node is a *case-insensitive subset*
of the language specified in the argument. So, in my example data in
test 3 the xml:lang="FR-CA" matches xml:lang="fr". I'm passing the
closest ancestral language attribute to the function that acts on the
language of the current node:
match="foreign[lang(ancestor::*[(_at_)xml:lang][1]/@xml:lang)]"
... which will be true if there is no xml:lang= on the element, or
the tested value if there is an xml:lang= on the element.
I hope this helps.
. . . . . . . . . Ken
--
Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds: publicly-available developer resources and training
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
--~------------------------------------------------------------------
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>
--~--