Re: Problems with gimp-tips and sr@Latn



Hi,

Danilo Segan <dsegan@gmx.net> writes:

> This would require changes to the following two lines in gimp-tips.dtd:
> <!ATTLIST welcome xml:lang NMTOKEN #IMPLIED>
> 
> <!ATTLIST thetip xml:lang NMTOKEN #IMPLIED>
> 
> Perhaps it could be sufficient to replace NMTOKEN with PCDATA

The actual change you are suggesting is:

diff -u -p -r1.3 gimp-tips.dtd
--- gimp-tips.dtd       11 Mar 2002 15:50:51 -0000      1.3
+++ gimp-tips.dtd       1 Sep 2003 21:20:45 -0000
@@ -12,7 +12,7 @@
 <!ELEMENT tt %markup;>
  
 <!ELEMENT welcome %markup;>
-<!ATTLIST welcome xml:lang NMTOKEN #IMPLIED>
+<!ATTLIST welcome xml:lang CDATA #IMPLIED>
  
 <!ELEMENT thetip %markup;>
-<!ATTLIST thetip xml:lang NMTOKEN #IMPLIED>
+<!ATTLIST thetip xml:lang CDATA #IMPLIED>


> Of course, this would make validation much less strict.

My XML book says that all valid language codes are well-formed XML
name tokens (NMTOKEN). So it seems that your choice of "sr@Latn"
doesn't work well with the xml:lang attribute. However I think we can
live with this. I've added the validation for the gimp-tips.xml to
avoid to ship gimp with a tips XML file that our parser doesn't like.
CDATA should however be strict enough to make our parser happy.

Unless someone comes up with a better solution, I will commit the
avove diff to CVS soon.


Sven



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]