This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
parsing and translating xml:lang attribute
- To: XSL-List Mulberrytech <xsl-list at mulberrytech dot com>
- Subject: parsing and translating xml:lang attribute
- From: "Matthias O. Will" <m dot o dot will at web dot de>
- Date: Tue, 24 Oct 2000 13:01:51 -0400 (EST)
- Reply-To: xsl-list at mulberrytech dot com
Hi,
some time ago, I sent the following question, and I am reposting it because
I haven't found a solution for this problem yet ... Any help is greatly
appreciated ...
My input DTD defines an element Language with an attribute xml:lang as
follows:
> <!ELEMENT Language EMPTY>
> <!ATTLIST Language xml:lang NMTOKEN #REQUIRED>
I have an example XML file conforming to this DTD, which has an instance of
this tag as follows:
> <Language xml:lang="ge"/>
but Xalan complains while parsing and produces the following error message:
> Parser error: Attribute "xml:lang" is required and must be specified for
> element type "Language"
I have no clue why the XML is not parsed correctly. Any takers?
The second issue is that the values for this attribute are conforming to
the two-digit language abbreviations according to ISO 639, but my target
DTD uses three-digit language strings according to ISO 639-2 (e. g. 'de'
would be translated into 'ger'). I do have a list of both, but I wonder how
to technically best achieve the mapping using XSL.
Again, I would greatly appreciate any help on those issues!
Thanks for any insight on this,
Matt
--
Matthias O. Will (m.o.will@web.de) <><
Institute of Computer Science, University of Freiburg
Georges-Koehler-Allee, Bldg. 51, D-79110 Freiburg, Germany
Phone: +49-761-203-8170 Fax: +49-761-203-8162
URL: http://ad.informatik.uni-freiburg.de/~will
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list