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

Re: rules for XML?


argyle sock pattern
[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



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.