[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: SAX-ext Attribute + Entity Parsing

  • From: Justin Couch <justin@v...>
  • To: XML-Dev <xml-dev@l...>
  • Date: Wed, 28 Feb 2001 19:05:36 +1100

justin erotic
Eric van der Vlist wrote:

> Instead of adding methods to the SAX2 classes, have you considered using
> the existing ones to pass additional elements/attributes from a specific
> namespace to the applications using the existing ones ?

[snip]
 
> The applications would then see this as an element:
> 
> <xxx:attributeDecl name="..." type="..." defValue="..." value="..."/>

My problem here is that I have no control over the DTD spec. It would be
nice if I could do that, but it is far from my hands. I'm just paid to
implement the code :) 

Of course the other problem is that even in the output XML file, we
can't guarantee that the authoring tools will adhere to this format.
It's hard enough getting the likes of Autodesk and Microstation to
export decent content as is, without asking for these extra tidbits.

The X3D spec is a hideously complex bit of XML which is making life all
the more complicated. Basically they are using Parameter Entities in a
form of strong typing for the attributes (their ideal is to use schemas,
but it too is lacking currently for what they want/need) and then
expecting to be able to have nice DOM transmutation to custom API's if
and when needed. Nice from the content authoring perspective, hideous
from a browser builders...

The end result is that as I'm parsing the attribute declaration, I would
like to build type information from being able to match the info passed
through attributeDecl and one of the earlier calls to
LexicalHandler.startEntity() and DeclHandler.internalEntityDecl().
Currently, because the attributeDecl is returning me the fully expanded
parameter entity (as per specification), but it leaves me with a bit of
a mis-match. (I'd like to use the parameter entity def for other
internal data/document building purposes). Is there another way using
the existing SAX2 APIs to get this information assuming that I have no
control over the DTD/Schema being passed?
 
> The main benefit from this method is that the additional information
> gathered from your documents are passed to the applications using a
> common and "standard" API and that you don't need to modify the layer
> between these applications and the SAX parser to get them.

Could you explain a little more what you mean by the layer modification
bit? Apart from supplying my own custom *Handler implementations, as per
the SAX2 spec, I'm not currently getting any lower into a specific SAX
parser implementation. 

-- 
Justin Couch                                    Author, Java Hacker
http://www.vlc.com.au/~justin/               Java 3D FAQ Maintainer
http://www.j3d.org/              J3D.org The Java 3D Community Site
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                              - Greg Bear, Slant
-------------------------------------------------------------------


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.