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

Re: Objections to / uses of PSVI?


psvi getannotation
Whew!  What a trail! And perhaps the most straight-forwardly definite thing
I've seen so far, from 1.13.5 of the XML Schema part 1 Rec, which I've now
found with the help of Jeni's pointers:

"3.13.5 Annotation Information Set Contributions
None as such: the addition of annotations to the post-schema-validation
infoset is covered by the post-schema-validation infoset contributions of
the enclosing components."

Thanks,

Tom P

Jeni Tennison wrote

> Hi Tom,
>
> > It's not clear to me that appinfo is considered part of the element
> > declaration
>
> If you have a look at Section 3.3.1 of XML Schema Structures at
> http://www.w3.org/TR/xmlschema-1/#Element_Declaration_details, you'll
> see the description of the Element Declaration Schema Component. This
> lists a number of properties:
>
> {name}
>     An NCName as defined by [XML-Namespaces].
> {target namespace}
>     Either ·absent· or a namespace name, as defined in [XML-Namespaces].
> {type definition}
>     Either a simple type definition or a complex type definition.
> {scope}
>     Optional. Either global or a complex type definition.
> {value constraint}
>     Optional. A pair consisting of a value and one of default, fixed.
> {nillable}
>     A boolean.
> {identity-constraint definitions}
>     A set of constraint definitions.
> {substitution group affiliation}
>     Optional. A top-level element definition.
> {substitution group exclusions}
>     A subset of {extension, restriction}.
> {disallowed substitutions}
>     A subset of {substitution, extension, restriction}.
> {abstract}
>     A boolean.
> {annotation}
>     Optional. An annotation.
>
> That bottom one there is {annotation}. If you skip down to Section
> 3.13.1 at http://www.w3.org/TR/xmlschema-1/#Annotation_details, you'll
> see the description of the Annotation Schema Component. It lists a
> number of properties:
>
> {application information}
>     A sequence of element information items.
> {user information}
>     A sequence of element information items.
> {attributes}
>     A sequence of attribute information items.
>
> Further down (Section 3.13.2) it says that when an xs:annotation
> element is translated into an Annotation Schema Component, the
> {application information} property is:
>
>   A sequence of the <appinfo> element information items from among the
>   [children], in order, if any, otherwise the empty sequence.
>
> How do these schema components get into the PSVI? Well, if you skip to
> Section 3.3.5, the Schema Information Set Contribution: Element
> Declaration (http://www.w3.org/TR/xmlschema-1/#sic-elt-decl) states
> that each element information item in the PSVI has either an [element
> declaration] or a [nil] property. If it has the [element declaration]
> property then the value of this property is:
>
>   an ·item isomorphic· to the declaration component itself
>
> That "item isomorphic" stuff means that there's an information item in
> the PSVI that has the same properties as the element declaration
> schema component -- it has an [annotation] property, for example,
> which holds an item isomorphic to the annotation schema component, and
> thus has a [application information] property, which holds a sequence
> of element information items.
>
> > - in your example it contained a lookup table that the schema
> > processor wouldn't know anything about. I've always assumed that
> > appinfo was outside of the schema-known information about the
> > element. I can understand an argument that it should be included,
> > but I haven't found anything so far that actually says so.
>
> The schema validator doesn't know what to do with the [annotation]
> component of the element declaration, but that doesn't mean it throws
> the information away. It retains it as a bit of XML, specifically so
> that applications that use the PSVI can access that application
> information if they want to.
>
> Say that there was a DOM interface to the PSVI -- I'd expect to be
> able to do something like:
>
>   Element ele = document.getDocumentElement();
>   if (!ele.isNil()) {
>      ElementDeclaration decl = ele.getElementDeclaration();
>      if (decl.hasAnnotation()) {
>         Annotation ann = decl.getAnnotation();
>         NodeList appinfo = ann.getApplicationInformation();
>      }
>   }
>
> Each of the nodes in the appinfo nodelist being a xs:appinfo element
> node.
>


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.