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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: New XML API from Microsoft

[ Lists Home | Date Index | Thread Index ]
  • From: john@datachannel.com (John Tigue)
  • To: Tim Bray <tbray@textuality.com>
  • Date: Thu, 24 Jul 1997 10:05:39 -0700

I think it is great that XML is developing so quickly. I welcome
Microsoft's hard work. I think, though,  that we need a well designed
object model for developer to use. From the below snippet taken from the
MS site, we can see that MS-XOM is based on the Java processor work. In
both these cases, I feel that a most basic object type, Element, is
misdefined. I do not think that text, comments, DTDs and "other" are
types of elements. Perhaps they are Markup but not Element.

I hope that we can work out a model which will be good for the
developers. I would also hope that MS would return to open,
collaborative discussion of XML development issues. Previous to the
beginning of work on Xapi-J this list had valuable and productive input
from MS and its developers. They have since grown silent. For an
alternative object model, please consider the collectively developed
Xapi-J. I have been maintaining a site for tracking the Xapi-J work. The
URL is http://www.datachannel.com/ChannelWorld/xml/dev.

MS-XOM IXMLElement most closely resembles Xapi-J's IContent interface.
IContent could be extended to include MS's work on IXMLElement perhaps
with a method, such as, getContentType() but not IXMLELement::get_
type(). MS's Java XML processor has already influence Xapi-J so merging
the differences would not be anything new in terms of process. The XML
spec (section 3.1) clearly defines the term "element type". The spec's
production [33] is as follows:

      STag ::= '<' Name (S Attribute)* S? '>'

The above "Name" is the "element type". Text, Comment, DTDs simply do
not have "element type". MS-XOM is misusing the spec's terminology.  I
hope in the end we have a standard which reflects the best of everyone's
ideas. Only by collaborating together can we get there. It would be a
shame if less well informed developers started learning XML doc
interfacing as curently modeled by MS-XOM.



HRESULT IXMLElement::get_type(
    long *plType)

     Returns S_OK on success.

     Indirect pointer to return the type.

Each node of the tree is labeled as being one of the following types:

typedef  enum xmlelemTYPE {

For Internet Explorer 4.0, the interesting element types are

In the following code, both the CHANNEL and the TITLE elements are
marked as being of type XMLELEMTYPE_ELEMENT. Their names are
returned as "CHANNEL" and "TITLE", respectively. (The names are always
all uppercase). The TITLE element has one child, which is a text
element marked as being of type XMLELEMTYPE_TEXT.

    <title> Breaking News </title>
    <!-- This is a comment element-->


John Tigue
DataChannel (http://www.datachannel.com)

begin:          vcard
fn:             John Tigue
n:              Tigue;John
org:            DataChannel
email;internet: john@datachannel.com
title:          Programmer
tel;work:       1-425-462-1999
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
end:            vcard


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

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