ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
[xml-dev] SLAIX (was: Can XLink be fixed)
by John Cowan other posts by this author
Aug 14 2002 7:17PM messages near this date
Re: [xml-dev] Re: Can XLink be fixed? | Re: [xml-dev] SLAIX (was: Can XLink be fixed)
Simon St.Laurent scripsit:

>  Provided that there's a clear mechanism for serializing the LSI as XML
>  in some easily processed form (XLink-like or not), I suspect you can
>  navigate those rocks.

I'd like to launch a discussion about solving the infoset serialization
problem once and for all, for every kind of infoset.  As a trial balloon,
I propose SLAIX, which stands for "serializing in Layman normal form
any infoset as XML."

A SLAIXified infoset looks like this:

There is a root element slaix:slaix which serves solely as a container.
It has no attributes except possibly namespace attributes.

Every child of slaix:slaix is an empty element with a qualified element type.
The URI reference to which the prefix of the element type name is bound
represents the infoset specification that defines elements of this type.
The localname represents the information item type within that specification.
There is one child for every information item in the infoset.
If the type name has more than one word, spaces are replaced by underscores.

The namespace-qualified attribute slaix:id
should appear on every slaix:item element.  It represents a
DTD-compatible ID for the element, and does not correspond to anything in
the information item.
specification that controls this item, and the name for the type of the
item in that specification.

Attributes on child elements that are not namespace-qualified
represent (and are named after) properties of that infoset item.
A property which is an ordered set of information items is represented
by a list of the slaix:id values of the elements corresponding to each
information item.  A property which is an unordered set of information
items is represented similarly after providing an arbitrary ordering.
A property which represents a simple type such as string, integer, or
boolean is represented using the canonical value given in XML Schema Part 2.
Properties of other types are outside the scope of this specification.
If the property name has more than one word, spaces are replaced by underscores.
If a property "has no value", the corresponding attribute is not present.

Attributes on child elements that are namespace-qualified represent
infoset augmentations: the URI reference of the element type specifies
the infoset specification that defines this type of information item,
and the URI reference of the attribute name specifies the infoset
specification that defines this particular property.

Here's an example:

The document

	<book> 
	  <author sort="brownjohn"> John Brown</author>
	  <title> My Life</title>
        </book> 

SLAIXifies somewhat as follows:

<slaix:slaix slaix:xmlns="..." xmlns="http://www.w3.org/TR/xml-infoset"> 
	<document slaix:id="root" children="e1" document_element="e1" base_URI="..."/> 
	<element slaix:id="e1" local_name="book" children="e2 e3"
		attributes="" namespace_attributes="" in-scope_namespaces="n1"
		base_URI="..." parent="root"/> 
	<element slaix:id="e2" local_name="author" children="c1 c2 c3 c4 c5 c6 c7 c8 c9 c10"
		attributes="a1" namespace_attributes="" in-scope_namespaces="n1"
		base_URI="..." parent="book"/> 
	<element slaix:id="e3" local_name="title" children="c11 c12 c13 c14 c15 c16 c17"
		attributes="" namespace_attributes="" in-scope_namespaces="n1"
		base_URI="..." parent="root"/> 
	<attribute slaix:id="a1" local_name="sort" normalized_value="brownjohn"
		specified="true" attribute_type="CDATA" owner_element="e2"/> 
	<namespace slaix:id="n1" prefix="xml"
		namespace_name="http://www.w3.org/XML/1998/namespace"/> 
	<character slaix:id="c1" character_code="74" element_content_whitespace
		= "false" parent="e2"/> 
	<!-- boring character elements omitted --> 
</slaix:slaix> 

-- 
John Cowan          http://www.ccil.org/~cowan        jcowan@[...].com
To say that Bilbo's breath was taken away is no description at all.  There are
no words left to express his staggerment, since Men changed the language that
they learned of elves in the days when all the world was wonderful. --The Hobbit

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org> 

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl> 
Thread:

Rick Jelliffe
Henry S. Thompson
Norman Walsh
Norman Walsh
Paul Prescod
Simon St.Laurent
Norman Walsh
Simon St.Laurent
Robin Berjon
=?iso-8859-1?Q?Bill_de_h=D3ra?=
Simon St.Laurent
Paul Prescod
Simon St.Laurent
Robin Berjon
Simon St.Laurent
Simon St.Laurent
Norman Walsh
Simon St.Laurent
Norman Walsh
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
J. David Eisenberg
Norman Walsh
J. David Eisenberg
Robin Berjon
Norman Walsh
Simon St.Laurent
Norman Walsh
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
Shane McCarron
Simon St.Laurent
Joe English
Norman Walsh
Simon St.Laurent
Keith W. Boone
Arjun Ray
Arjun Ray
Rick Jelliffe
Simon St.Laurent
Simon St.Laurent
Tim Bray
Simon St.Laurent
Tim Bray
Simon St.Laurent
Elliotte Rusty Harold
Simon St.Laurent
Lars Marius Garshol
Bob DuCharme
Elliotte Rusty Harold
Didier PH Martin
Elliotte Rusty Harold
Simon St.Laurent
Elliotte Rusty Harold
Norman Walsh
Tim Bray
Simon St.Laurent
Tim Bray
Simon St.Laurent
Simon St.Laurent
Simon St.Laurent
Ann Navarro
Simon St.Laurent
Elliotte Rusty Harold
Simon St.Laurent
Simon St.Laurent
Elliotte Rusty Harold
Simon St.Laurent
John Cowan
Rick Jelliffe
Simon St.Laurent
John Cowan
Simon St.Laurent
John Cowan
Simon St.Laurent
Mike Champion
Didier PH Martin
John Cowan
Mike Champion
Simon St.Laurent
Norman Walsh
Tim Bray
Simon St.Laurent
Rick Jelliffe
Norman Walsh
Masayasu Ishikawa
John Cowan
Jeff Rafter

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved