Hello,
 
I have a trouble about an XML file and two Xerces examples (Sax2count, and Domcount).
I'm testing on PC with NT4 sp5, I'm using xerces 1.40 binary and examples, and visual c++ 6.0 sp4.
 
XML file:
 
<?xml version='1.0' encoding="UTF-8" ?>
<!DOCTYPE Dictionnary [
<!ELEMENT Dictionnary (category)+>
<!ELEMENT category (action)+>
<!ATTLIST category id ID #REQUIRED>
<!ATTLIST action what (add|delete) #REQUIRED>
<!ELEMENT action (content)+>
<!ELEMENT content (#PCDATA)>
]>
 
<Dictionnary>
  <category id="0">
    <action what="add">
      <content>JOURX.DET.CUM.</content>
    </action>
    <action what="add">
      <content>JOURX.DET.CUM.</content>
    </action>
  </category>
  <category id="1">
    <action what="add">
      <content>000001</content>
      <content>000002</content>
      <content>000003</content>
      <content>000004</content>
    </action>
  </category>
</Dictionnary>
when I'm executing Sax2count or Domcount (F:\xerces\xerces-c1_4_0-win32\bin>sax2count f:\temp\test.xml), I have this message:
 
Error at file f:\temp\test.xml, line 12, char 20
  Message: The values for attribute 'id' must be names or name tokens
 
Can tell me why I can't use "0" for Id attribute of category.
 
When I'm testing successfully this file with Internet explorer 5 and Notepad Xml.
 
Best Regard.
 
Pierre FEUILLOLEY
 
Docubase Systems
116, rue d'Aguesseau - BP 405
92103 BOULOGNE BILLANCOURT - France
*(33) 01 49 09 22 85
[EMAIL PROTECTED]

Reply via email to