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] rules for XML?

[ Lists Home | Date Index | Thread Index ]

[Owen Walcher

> <sock pattern="Argyle"/> is the same as
> <sock><pattern>Argyle</pattern></sock> from an XML point of view,
>

Well, no it is not the same from an "XML Point of view".  The two produce
different infoset contributions, for example.  They **may** be equivalent in
the mind of the document creator, which of course is the semantics issue.

> <sock pattern="Argyle">
>   <size>large</size>
> </sock>  vs.
>
> <sock>
>   <pattern>Argyle</pattern>
>   <size>Large</size>
> </sock>
>
> Have two completely different semantics, in that the attribute
> pattern="Argyle" (in my opinion) should not be used because it does not
> further specify the size of the sock.

Be warned - this quickly becomes a religious argument!

> Many are using XML as a transport, and then shredding/CLOBing back into
> their rigid RDBMS structures (which is why XSD seems so desired by the
> "higher end XML gods"), but some of us are trying to push the art, and use
> things like Meta Object Protocols and Reflection to be able to handle
TRULY
> heterogeneous and FULLY extensible XML documents.
>
> Is anyone else working along these lines to move programming from the
> cottage industry it now is into the current century?
>
> BTW: I am hoping this to be my doctoral dissertation subject, so please
> shred away!

I personally do not think that you can get anywhere by assuming that ANY
consistent kind of semantics is implied by XML structure.  Remember (it is
said often enough on the list), XML is **syntax**.  The only "semantics"
there is for elements is "containment", but what does that imply?  Who
knows?  The use of containment semantics may even be inconsistent within the
same XML document.

The use of an element instead of an attribute may only indicate that the
designer did not like attributes, or that he thought they would be harder to
process (there is that myth!).

Basically, with both attributes and child elements, you are entitled to
infer that the document designer sees **some** relationship between them and
their containing element.  What the nature of that relationship might be, on
the other hand, is pure speculation.  Sometimes you might be able to tell by
some semantic analysis of the names, but mostly it reflects some modeling
(probably informal) that is internal to the designer's mind.  And even a
schema does not help you here.

You may want to search for references about turning XML documents into RDF
or topic maps, since the same issues are involved.

Cheers,

Tom P






 

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

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