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

RE: Request for Comments: XML binary encoding

  • From: "Al B. Snell" <alaric@a...>
  • To: Danny Ayers <danny@p...>
  • Date: Mon, 09 Apr 2001 14:27:34 +0100 (BST)

xml binary encoding
On Mon, 9 Apr 2001, Danny Ayers wrote:

> In what order will the elements be delivered? I'm guessing the transfer
> would be most efficient if structure was sent first then data, but this
> would screw up SAX-like event driven interfaces that work on the elements in
> doc order. If you weren't careful, the overhead of emulating SAX could set
> you back at square one. Also worth bearing in mind is that SAX doesn't keep
> an in-memory model, so the data stream can be arbitrarily long :
> structure-data might cause problems. structure-data-structure-data... ???

Is there a good reason to do other than:

SYMBOL("...URI of XHTML namespace gets assigned symbol ID 1")
SYMBOL("...URI of CIE XYZ color space gets assigned symbol ID 2")
SYMBOL("...URI of XML Adaption Layer namespace, gets symbol ID 3")

STARTINTERNALENTITY
 STRING("This is an internal entity containing a string. It gets entity ID 1")
ENDINTERNALENTITY

EXTERNALENTITY("http://a-uri/gets-entity-ID-2")

STARTELEMENT(3,"xml")
 STARTATTRIBUTE(3,"version")
  STRING("1.0")
 ENDATTRIBUTE
 STARTELEMENT(1,"html")
  STARTELEMENT(1,"head")
   STARTELEMENT(1,"title")
    STRING("Alaric's Zany Page")
   ENDELEMENT
  ENDELEMENT
  STARTELEMENT(1,"body")
   STARTATTRIBUTE(1,"color")
    COLOR(2,"0.5,0.5,0.5")       
   ENDATTRIBUTE
   STARTELEMENT(1,"p")
    STRING("This is some ")
    STARTELEMENT(1,"em")
     STRING("emphasised")
    ENDELEMENT
    STRING(" text. Here is the content of an entity:")
    ENTITY(1)
    STRING("...and here's the content of an external parsed entity:")
    ENTITY(2)
   ENDELEMENT
  ENDELEMENT
 ENDELEMENT
ENDELEMENT

 - that's what I was thinking of. Document order preserved.

Note that the attributes could contain arbitary markup, not just
atomic data types, although this facility would not be used for standard
XML.

Note the use of symbols to avoid repeating the namespace URIs for elements
and color spaces.

> I haven't a copy of the spec at hand - in which part of the DOM is the bit
> about elements being string based?

Hrm... there are string nodes and not (say) integer or date or color or
boolean nodes. They could be added.

> Some use cases would help - e.g. how you would replace an existing SOAP
> transport.

Yep. And stuff about applications. Ideally this would be [expletive deleted] into
existing DOM/SAX implementations so they recognise incoming data in this
format and transparently handle it as XML if the application uses the
standard SAX/DOM interfaces; or if the application requests the enhanced
stuff, it would be given the enhanced interfaces, and standard XML
documents would be presented to it wrapped in an XAL "xml" element as
shown above... this transparent trivial translation within XML libraries
would ease adoption, but it needs to be made explicit to prevent people
becoming scared (you know what *humans* are like about new things).

> One last random though - what the 2-channel kludge? First channel provides
> schema in XML format, 2nd channel provides data as specified. (I think this
> same principle came up a while ago, with the schema being sent first)

Yeah; it's less useful for small messages such as SOAP, though, where the
schema may end up bigger than the data itself - the complexity of the
parser required wouldn't be justified there...

Reminds me. Processing instructions. Apart from <?xml ... ?>, is anybody
actually using these? What for? How about putting them in namespaces? I'm
wondering about an <?include "URI"?> PI to replace external entity
references (which I hate). But there's no mechanism for standardising
PIs. Their exact purpose isn't really specified...

> Danny Ayers
> http://www.isacat.net

ABS

-- 
                               Alaric B. Snell
 http://www.alaric-snell.com/  http://RFC.net/  http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software  


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.