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

Re: Lx: compact syntax for XML


xml continuation
Rick Marshall wrote:
> this may sound crazy, but every proposal i've seen so far to make xml
> quicker/faster seems to rely on getting rid of the end tag.
> 
> either binary run length coded formats, or traditional binary number
> encodings etc; or more standard termination chars }, ), NUL, etc. anyone
> want to propose a syntax with ; as a terminator ? or did i miss that
> one.
> 
> here's the valuable trick. the end tag must identifiably match the start
> tag, and it must be validated that the end tags occur in the correct
> order, and the content must be unambiguously NOT an end tag.
> 
> any takers?

I did it with indentation, a la Python.

xsl:stylesheet::
    @version::1.0
    xsl:template::
       @match::node()|@*
       copy::
          xsl:apply-templates::
             @select:@*|node()


The double colons are used so that single ones can be used in Qnames. 
Any line that does not begin with a word:: is a continuation of PCDATA 
content from a previous line (there is a comment indicator, too).  "@", 
of course, signals an attribute name.

The apparent weakness of this simpleminded verson is that it does not 
know about namespaces, just Qnames, but that is OK because we just want 
to spit out real, angle-bracketed xml using the same QNames.

A similar parser lets you turn indented lists into xml - once you can 
pick up the indent level when there is a jump of several levels of 
un-indent, you are set to parse lots of similar formats.

I've looked at or tried a number of compact syntaxes, but this is the 
only one I come back to.

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.