Re: [xml] FIXED attributes.



On Mon, Jul 30, 2001 at 03:39:02PM -0300, Hector Laverense wrote:
      Hi, I'm having some troubles parsing documents with the SAX
inteface, I use an external DTD like this:

<!-- test.dtd ***********************************************-->
<!ENTITY % FF            'fatt            CDATA    #FIXED'>
<!ENTITY % VV            'vatt            CDATA    #REQUIRED'>
<!ELEMENT el EMPTY>
<!ATTLIST el
      %FF;   "somevalue"
      %VV;>
<!--*********************************************************-->

so, a valid xml for this DTD could be:

<?xml version="1.0" standalone="no" ?>
<!DOCTYPE el SYSTEM "test.dtd">
<el vatt="hello"/>


The problem arises in the startElement callback function, when I try the get
the entire attribute list the only attribute that I recive is vatt. Any
suggestions?

  libxml won't provide FIXED attributes at the SAX level.
They are provided only if 1/ you parse the Dtd (not done by default),
2/ lookup attribute values at the DOM level by using xmlGetAttr()

  Posting a third time to the list won't help,

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




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