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

Re: General SAX2 Observations

  • From: David Brownell <david-b@p...>
  • To: "Box, Don" <dbox@d...>, xml-dev@x..., "David Megginson (E-mail)" <david@m...>
  • Date: Mon, 13 Mar 2000 10:51:30 -0800

Re: General SAX2 Observations
General SAX2 Observations> 1) The feature mechanism is busted wrt the two
namespace-related features.

Agreed.  As the simplest conceptual issue, two flags define four states ...
one is declared illegal, and there are really only two useful models for
working with XML documents (XML, or NS).  Why are three  models provided?


> Ideally, the ContentHandler would have the following method:
>     public abstract int getNamespaceSupport();

I'm not sure I could limit it to that particular feature.  Wouldn't it be
important to handle others too?  There's a slippery slope there; if
the datastream must be namespace-legal to some degree, why wouldn't it
be as appropriate to offer a guarantee that it be schema-du-jour-valid?


> that would return one of the following three values:
>     static final int NAMESPACES_ONLY = 0;
>     static final int RAW_NAMES_ONLY = 1;
>     static final int RAW_NAMES_PLUS_NAMESPACES = 2;

Actually, I'd really go for Elliotte's suggestion here:  don't introduce
a new term "Raw" names.  If a new term is needed, I'd say "XML" Names, to
highlight the fact that the namespaces spec makes certain XML 1.0 documents
become illegal ... else, use the "QName" from the namespace spec.

And again, having three modes seems like it's too much.  My preference
would be to get rid of "namespaces only".  As has been established in
other discussions on this list, qualified names can and do appear in more
locations in a document than an XML processor may be aware of.  It's not
healthy to _encourage_ the needless discarding of prefix information.


Re C/C++ mappings you proposed the following guidelines:

> a) Hoist all shared types into pure abstract base classes or flat
structures.
> b) Never allow class-based references or instances to be shared across
>    component boundaries. This includes std::string!
> c) Understand that RTTI doesn't work across component boundaries.
> d) Understand that exception handling doesn't work across component
boundaries.
> e) Understand the tradeoffs of supporting both char and wchar_t.
> f) Understand that malloc/free new/delete don't work across component
boundaries.

Seems like all those references to "component boundaries" would be specific
to some particular compilation environments.  Which of those guidelines
come from limitations in current C++ environments, vs from the C++ standard?
Which come from _intermixing_ C/C++ components with others (which has never
been fully standardized)?

Note that I'm not disagreeing that some such guidelines _may_ be needed; I'm
concerned that API designs not be torqued to suit particular compilers,
since
some of them have severe standards conformance problems.

- Dave



***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

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.