[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] SAX-like parsing of DTDs
- From: Mark S Petrovic <petrovic corp earthlink net>
- To: Daniel Veillard <veillard redhat com>
- Cc: xml gnome org
- Subject: Re: [xml] SAX-like parsing of DTDs
- Date: Thu, 27 Feb 2003 09:05:51 -0800
On 27Feb, Daniel Veillard wrote:
> On Thu, Feb 27, 2003 at 07:51:25AM -0800, Mark S Petrovic wrote:
> > Good day.
> >
> > Does libxml2 expose an API for performing basic parsing of a DTD -
> > specifically providing the ability to sense when an attribute declaration
> > appears in the input stream? I am looking for the DTD-equivalent of
> > SAX-based parsing of an XML stream. My goal is to assemble the logical
>
> What about looking at it before asking ? Just laziness ?
>
> include/libxml/parser.h
Thank you for the pointer.
> /**
> * attributeDeclSAXFunc:
> * @ctx: the user data (XML parser context)
> * @elem: the name of the element
> * @fullname: the attribute name
> * @type: the attribute type
> * @def: the type of default value
> * @defaultValue: the attribute default value
> * @tree: the tree of enumerated value set
> *
> * An attribute definition has been parsed.
> */
> typedef void (*attributeDeclSAXFunc)(void *ctx,
> const xmlChar *elem,
> const xmlChar *fullname,
> int type,
> int def,
> const xmlChar *defaultValue,
> xmlEnumerationPtr tree);
>
> struct _xmlSAXHandler {
> ...
> attributeDeclSAXFunc attributeDecl;
> ...
> };
>
> > where the attributeName_i are ordered in the order in which they are
> > declared in the DTD.
>
> I already said it made no sense to try to build an order.
Yes, I remember well, and respect that fact. However, I am forced
to deal with an existing infrastructure that demands I know the order.
You may argue that this is not, then, XML according to the spirit of XML.
I will not contest - nor can I reasonably hope to change my condition.
Mark
> Daniel
>
> --
> Daniel Veillard | Red Hat Network https://rhn.redhat.com/
> 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]