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

RE: dynamically generated XML Schema?! Re: R: [xml-d

  • To: Burak.Emir@e...
  • Subject: RE: dynamically generated XML Schema?! Re: R: Number of active public XML schemas
  • From: Alessandro Triglia <sandro@m...>
  • Date: Thu, 4 Nov 2004 15:16:02 +0100 (CET)
  • Cc: xml-dev@l...

x.694


> -----Original Message-----
> From: Burak Emir [mailto:Burak.Emir@e...] 
> Sent: Thursday, November 04, 2004 04:29
> To: Alessandro Triglia
> Cc: XML Developers List
> Subject: Re:  dynamically generated XML Schema?! Re: 
>  R:  Number of active public XML schemas
> 
> 
> Alessandro,
> 
> Alessandro Triglia wrote:
> 
> >Another case of dynamic generation is translation between 
> schema languages.
> >
> >  
> >
> I don't see how this brings me closer to a use case for dynamic 
> generation, in the sense that some event happens, a schema has to be 
> generated, and we can use this schema to validate data.
> 
> I see that when you have such a use case (i.e. one like Jeff Reif 
> suggested), this can imply one needs schema translation, but not the 
> other way round.
> 
> >An example is the X.694 standard, which specifies a 
> translation from XML
> >Schema to ASN.1.  There has been a proposal to standardize 
> the reverse
> >translation as well.
> >
> >However, in the case of X.694, the fact that the source 
> syntax is XML does
> >not play a significant role.  X.694 converts abstract 
> **schema components**
> >to equivalent ASN.1 constructs, so it doesn't really deal 
> with the XML
> >representation of XSD.  (Before applying X.694, schema 
> documents must be
> >converted to abstract Schemas as specified in the XML Schema
> >Recommendation.)
> >
> >  
> >
> I did not find the word "abstract schema" in the Rec, I guess 
> you mean 
> "its meaning".


No, I don't mean "its meaning".

XSD specifies two distinct things: an abstract data model and an "XML representation".  A "Schema" (as used in the Rec) is not an XML document.  It is a collection of abstract "schema components", such as element declarations, simple/complex type definitions, attribute declarations, etc.

Validity assessment is specified in terms of those abstract schema components, not in terms of <complexType> elements and the like.  The Rec says that the abstract schema components may be represented in XML but don't have to.  

In a sense, XSD is a language with no inherent syntax (or with a pluggable syntax if you wish).  The "XML representation" is one possible syntax, but the Rec does not mandate its use.  The Rec explicitly allows the use of other syntaxes or other (non-syntactical) means to build a representation of the schema components in memory.

See the conformance clause (2.4) of the Rec.  Conformance has three levels, and you can be conformant ("minimally conformant") without implementing the XML representation at all.

The following Note in the conformance clause is interesting:

----------------------
Note: By separating the conformance requirements relating to the concrete syntax of XML schema documents, this specification admits processors which use schemas stored in optimized binary representations, dynamically created schemas represented as programming language data structures, or implementations in which particular schemas are compiled into executable code such as C or Java. Such processors can be said to be ·minimally conforming· but not necessarily in ·conformance to the XML Representation of Schemas·.
----------------------

But the whole clause 2 "Conceptual Framework" is interesting as well.

***

The X.694 standard took the approach of mapping from the abstract Schema of XSD to the target language (ASN.1).  The prior mapping from the schema documents to the Schema is handled by the XSD Rec, and does not need to be re-specified in another standard.

Alessandro




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.