OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] SLAIX (was: Can XLink be fixed)

[ Lists Home | Date Index | Thread Index ]
  • To: "John Cowan" <jcowan@reutershealth.com>,<xml-dev@lists.xml.org>
  • Subject: RE: [xml-dev] SLAIX (was: Can XLink be fixed)
  • From: "Manos Batsis" <m.batsis@bsnet.gr>
  • Date: Thu, 15 Aug 2002 15:41:02 +0300
  • Thread-index: AcJDyA2K0IMdWt6tQTW3xOGTs55VLAAj+WVn
  • Thread-topic: [xml-dev] SLAIX (was: Can XLink be fixed)

Title: RE: [xml-dev] SLAIX (was: Can XLink be fixed)

The only problem with the SLAIX serialization below, is that it is simply redundand. While looking at it, my reaction was to erase attributes and use the XML syntax to draw the information items instead (using the XML Information Set directly).

However, this would seem a lot more logical if some other form of syntax was used; it is redundant because it's XML in the first place.

My question is, you said this is a serialization for all infosets, not just the infoset. So, suppose I begin to erase the explicit serialization towards the original document, where should I stop to have enough information for any infoset and not just the infoset? In other words, what is that piece in the design that makes this serialization suitable for any infoset?

Regards,

Manos


From:   John Cowan [mailto:jcowan@reutershealth.com]

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@reutershealth.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>







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS