[xml] Validating, Attributes with #Fixed Problem

I want to validate a document/a DOM three in memory 
(after parsing) . But i am missing that the #Fixed attributes from 
the DTD are substitutet.


char*                  pSomeXml = "<xml code .... >" ;
xmlValidCtxtPtr ctxtvalid;
int                       rc = 0;
MemXmlDoc = xmlParseMemory(pSomeXml, strlen(pSomeXml));
dtd = xmlParseDTD(NULL, "abc.dtd");
rc = xmlValidateDtd(ctxtvalid, MemXmlDoc, dtd) ;
rc = xmlValidateDocument(ctxtvalid, MemXmlDoc); 
rc = xmlValidateDtdFinal (ctxtvalid, MemXmlDoc) ;

xmlDocDumpMemory(MemXmlDoc, &pStr, &Len);
printf("\n%s", pStr);
/* here I am missing the attribut doubleroom="yes"  */

XML Sample:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE hotels SYSTEM "hotels.dtd">
   <hotel name="Hotel1">
       some text

DTD Sample:
<!ELEMENT hotels (hotel)*>
<!ELEMENT hotel (#PCDATA)>
<!ATTLIST hotel
   name                  CDATA               #REQUIRED
   doubleroom        (yes|no)              #FIXED "yes"

Can anyone help me ? 

thanks in advance
Volker Roth

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