OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] DOM L3 and Type info

[ Lists Home | Date Index | Thread Index ]

Hi Jeff,

Jeff Rafter wrote:
> I had a quick question about DOM L3-- I was trying to quickly understand the
> new Load and Save part of DOM L3 and I was wondering how type info is
> handled. Specifically I am looking to find out if there is a way to specify
> an element's or attribute's type as the document is being created. I found a
> couple references that mentioned [attribute type] but could find the
> implementation.

I don't think you will find what you are looking for in DOM L3 AS, and 
the reason for this is probably in that AS (Abstract Schemas) are 
defined as a "lowest common denominator" between WXS (W3C XML Schema) 
and DTDs:

"It is anticipated that lowest common denominator general APIs generated 
in this chapter can support both DTDs and XML Schemas, and other XML 
abstract schemas down the road."

Since what WXS calls element type has no meaning for DTDs, it doesn't 
find its place in the "lowest common denominator".

What you will find, OTH, is an API with interfaces that allow to edit a 
document described using any schema language if the schema processor 
implements AS, but this is quite different than what you're looking for.

Note also that DOM L3 has kept the orginal meaning of "element type" 
defined in XML 1.0 which is what WXS calls "element name" is is 
different from WXS "element type".

> It would be interesting if, for example, you could create a DOM and specify
> certain attributes as type "ID"-- without needing a schema or DTD
> specifically. Dave Brownell has a DOMConsumer in the GNU JAXP project that
> generates a DOM from SAX2. It would be exciting if someone could write a SAX
> filter to insert type information (security concerns aside). This would
> remove the need for an internal subset to create IDs. This type of thing
> would also open the door to [Your favorite schema language] a little wider.

I think that this would be very useful but not sufficient and that this 
should also be expressed as a XML serialization (eventually using PIs) 
more fited for permanent storage and pipe frameworks.


> I am sure it is in there already-- any pointers?
> Thanks,
> Jeff Rafter
> Defined Systems
> http://www.defined.net
> XML Development and Developer Web Hosting
See you in Seattle.
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS