You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Eric Ye <er...@locus.apache.org> on 2000/08/17 19:54:28 UTC

Re: Using xml:lang

> Here is the file :
>
> <!DOCTYPE TEST [
> <!ENTITY % LANG-ATT "xml:lang NMTOKEN 'fr'">
> <!ELEMENT TEST (#PCDATA|EMPT)*>
> <!ATTLIST TEST
>    xml:lang NMTOKEN 'fr'
>   >
> <!ELEMENT EMPT EMPTY>
> <!ATTLIST EMPT
>    xml:lang NMTOKEN 'fr'
>   >
> ]>
> <TEST>Some text in <EMPT/> french</TEST>
>

This bug has been fixed in the current CVS repository, we expect another
release(1.1.4) coming out in the week of 8/28

> Here is the error message, I think there should not be any :
>
> T:\tmp>java org.apache.xalan.xslt.Process -in test.dtd -xsl
> t:\mutu-xml\bin\pgm\normalize.xsl -out can_test.dtd
> ========= Parsing file:t:/mutu-xml/bin/pgm/normalize.xsl ==========
> Parse of file:t:/mutu-xml/bin/pgm/normalize.xsl took 491 milliseconds
> ========= Parsing file:T:/tmp/test.dtd ==========
> Parser error: Attribute "lang" must be declared for element type "TEST".
> Parser error: Attribute "lang" must be declared for element type "EMPT".
> Parse of file:T:/tmp/test.dtd took 791 milliseconds
>
>
>
> Here is now an other kind of error
> <!DOCTYPE TEST [
> <!ENTITY % LANG-ATT ' xml:lang NMTOKEN "fr"'>
> <!ELEMENT TEST (#PCDATA)>
> <!ATTLIST TEST
>    %LANG-ATT;
>   >
> ]>
> <TEST>Some text in french</TEST>
>

You can't reference a PE in such a location, it is only legal in external
subset. Please refer to XML1.0 rec. Section 2.8, WFC: PEs in internal
subset.

_____


Eric Ye * IBM, JTC - Silicon Valley * ericye@locus.apache.org