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

Re: RE : Comparison of Xml documents


xml information documents comparison
Alessandro Triglia wrote:
> Bob,
> 
> As I said yesterday,

Sorry to make you repeat yourself.

> **Roughly speaking**, WXS "sequence"s are mapped to ASN.1 SEQUENCEs, while
> WXS "all"s are mapped to ASN.1 SEQUENCEs plus explicit information about the
> order.  The order is made a part of the abstract type definition and so is
> made available to the ASN.1 application.  
> 
> So, although ASN.1 lacks, per se, an equivalent of the WXS "all" model
> group, the ability to specify semantic significance in XML encodings (which
> means lexical "variable order", as opposed to "any order") is realized by
> writing something like the following:
> 
> -------------
> MyAll ::= [USE-ORDER] SEQUENCE {
>     order SEQUENCE OF ENUMERATED {a, b, c},
>     a     INTEGER (1..1000),
>     b     INTEGER (1..100),
>     c     UTF8String }
> -------------
> 
> This works as follows.  The abstract value:
> 
> v1 MyAll ::= { order {b, c, a}, 
>     a 1000,  b 70,  c "hello" }
> 
> is encoded in XML as:
> 
> -------------
> <v1>
>     <b>70</b>
>     <c>hello<c/>
>     <a>1000</a>
> </v1>
> -------------
> 
> The abstract value:
>   
> v2 MyAll ::= { order {c, a, b}, 
>     a 1000,  b 70,  c "hello" }
> 
> is encoded as:
> 
> -------------
> <v2>
>     <c>hello<c/>
>     <a>1000</a>
>     <b>70</b>
> </v2>
> -------------
> 
> In this way, even if the constructor is SEQUENCE (and not "ALL"), the
> information about the order is present in the abstract value, and is
> therefore accessible by the application, both when writing and when reading
> the abstract instance.
> 
> In other encoding rules the SEQUENCE OF ENUMERATED is encoded as a normal
> SEQUENCE OF, because there is no requirement for the "lexical order" to be
> implemented as physical lexical order.  Notice that it is always the same
> information, which may be "encoded" either as a physical order of child
> elements (in XML), or explicitly as a SEQUENCE OF ENUMERATED (in other
> encoding rules).

I was rolling right along with you until now. (I know I'm in trouble 
when I don't understand either sentence of a two-sentence paragraph.)

First things first, Encoding aside, do applications exchange abstract 
values? In other words, is the value:

 > v2 MyAll ::= { order {c, a, b},
 >     a 1000,  b 70,  c "hello" }

Recieved at the other end as a sequence of (c, a, b), i.e., in that 
order, or not?

Thanks again.

Bob Foster


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.