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

Re: YML: A Grand Unification of SAX and DOM? (fwd)

  • From: "Rick Jelliffe" <ricko@a...>
  • To: <xml-dev@i...>
  • Date: Sat, 4 Dec 1999 18:07:16 +0800

pocket.ch

 
From: Don Park <donpark@d...> 

 
> <element>
>  <pocket:attributes>
>    <att>
>      <ch>val</ch>
>    </att>
>  </pocket:attributes>
>  <pocket:children>
>    <foo>
>      <pocket:text>bar</pocket:text>
>    </foo>
>  </pocket:children>
></element>

Compare to XML less RSI-inducing
    <pocket ch="val"><foo>bar</foo></pocket>

Note that the XSL pattern to find the attribute ch of element
pocket is  "pocket/@ch"  for the XML but 
"element/pocket:children/../pocket:attributes/att/ch"
for the alleged SML. It could be said that one could use
"element/pocket:attributes/att/ch"  but then there is the
validation possibility where the pocket:attributes elements
are made part of some other element. 

Of course, it would be possible to make an implementation
of an XSL processor that interprets "pocket/@ch" as 
"element/pocket:children/../pocket:attributes/att/ch"
and hides this from the user.  It means that instead of looking
at a type field in the parse tree, the name is used (presumably
a better implementation method would be to translate
the alleged SML into standard XML DOM on import).

But then the user would have to have in mind the XML markup
when reading the alleged SML, which is an additional
mental burdon.  But I look forward to the development
of SPaths, SXSL, SDOM, SML Schemas, SPointers,
SLink, SInclusions, etcs.  At best, SML will make it easier
to get exactly where we are today anywhere.

><element>
>  <sax:cache>
>    <foo>bar</foo>
>  </sax:cache>
></element>

Compare to XML:
    <foo sax:cache="active">bar</foo>
When an effect follows element scope, it is better practise
to use elements than PIs. Otherwise
    <?sax cache="on"?><foo>bar</foo><?sax cache="off"?>
or perhaps
    <sax:cache><foo>bar</foo></sax:cache>

><element>
>  <sax:cache>true</sax:cache>
>  <foo>bar</foo>
>  <sax:cache>false</sax:cache>
></element>

Compare to XML:
    <foo sax:cache="active">bar</foo>
When an effect follows element scope, it is better practise
to use elements than PIs. Otherwise
    <?sax cache="true"?><foo>bar</foo><?sax cache="false"?>
but of course we cannot comment to deeply on a snapshot.

Rick Jelliffe

    


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



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.