RE: XSLT: conditional output, or l10n issues
Or, to express it the > other way round, it needs to include all langflow elements where > xml:lang isn't specified at all, as well as all langflow elements > where xml:lang="en" is specified. > > How would I express this in XSLT? The problem is of course that lang("en") returns true for elements where xml:lang="en", false where xml:lang="de", and false where it is unspecified. I can't think of any way of doing the test other than the unweildy: <xsl:if test="lang('en') or not(from-ancestor-or-self(*)[@xml-lang])"> In SAXON 4.2 you could write <xsl:if test="^xml:lang='en' or not(^xml:lang)"> Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format