[xml] Validating, Attributes with #Fixed Problem
- From: Volker Roth <pulken gmx net>
- To: xml gnome org
- Subject: [xml] Validating, Attributes with #Fixed Problem
- Date: Sat, 4 Sep 2004 15:29:32 +0200
Hello,
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.
Sample:
char* pSomeXml = "<xml code .... >" ;
xmlValidCtxtPtr ctxtvalid;
int rc = 0;
<snip>
MemXmlDoc = xmlParseMemory(pSomeXml, strlen(pSomeXml));
<snip>
dtd = xmlParseDTD(NULL, "abc.dtd");
<snip>
rc = xmlValidateDtd(ctxtvalid, MemXmlDoc, dtd) ;
<or>
rc = xmlValidateDocument(ctxtvalid, MemXmlDoc);
<or>
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">
<hotels>
<hotel name="Hotel1">
some text
</hotel>
</hotels>
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]