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

Re: Types and Context

  • From: Jeni Tennison <mail@j...>
  • To: "Simon St.Laurent" <simonstl@s...>
  • Date: Wed, 23 May 2001 10:17:52 +0100

types of context
Hi Simon,

> Sure thing.  Now do that with <foo myInt="123"/> and tell me what it
> looks like.

For interest, using the PSVI output from XSV 1.2, it looks roughly
like:

  <element xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
           xmlns='http://www.w3.org/2001/03/XMLInfoset'
           xmlns:psv='http://www.w3.org/2001/03/XMLSchema-infoset'>
    <namespaceName xsi:nil='true'/>
    <localName>foo</localName>
    <prefix xsi:nil='true'/>
    <children/>
    <attributes>
      <attribute>
        <namespaceName xsi:nil='true'/>
        <localName>myInt</localName>
        <prefix xsi:nil='true'/>
        <normalizedValue>123</normalizedValue>
        <specified>true</specified>
        <attributeType xsi:nil='true'/>
        <references xsi:nil='true'/>
        <psv:validationAttempted>full</psv:validationAttempted>
        <psv:validationContext>
          <pointer ref='g1'/>
        </psv:validationContext>
        <psv:validity>valid</psv:validity>
        <psv:schemaErrorCode xsi:nil='true'/>
        <psv:schemaNormalizedValue>123</psv:schemaNormalizedValue>
        <psv:schemaSpecified xsi:nil='true'/>
        <psv:typeDefinition>
          <pointer ref='xsd:type.integer'/>
        </psv:typeDefinition>
        <psv:memberTypeDefinition xsi:nil='true'/>
        <psv:declaration>
          <pointer ref='attr.myInt.9'/>
        </psv:declaration>
      </attribute>
    </attributes>
    <namespaceAttributes/>
    <inScopeNamespaces>
      <namespace>
        <prefix>xsi</prefix>
        <namespaceName>http://www.w3.org/2001/XMLSchema-instance</namespaceName>
      </namespace>
      <namespace>
        <prefix>xml</prefix>
        <namespaceName>http://www.w3.org/XML/1998/namespace</namespaceName>
      </namespace>
    </inScopeNamespaces>
    <baseURI>file:/C:/temp/test.xml</baseURI>
    <psv:schemaInformation xsi:nil='true'/>
    <psv:validationAttempted>full</psv:validationAttempted>
    <psv:validationContext>
      <pointer ref='g1'/>
    </psv:validationContext>
    <psv:validity>valid</psv:validity>
    <psv:schemaErrorCode xsi:nil='true'/>
    <psv:schemaNormalizedValue xsi:nil='true'/>
    <psv:schemaSpecified xsi:nil='true'/>
    <psv:typeDefinition>
      <pointer ref='type._anon_11'/>
    </psv:typeDefinition>
    <psv:memberTypeDefinition xsi:nil='true'/>
    <psv:declaration>
      <pointer ref='elt.foo.12'/>
    </psv:declaration>
    <psv:nil>false</psv:nil>
    <psv:notation xsi:nil='true'/>
    <psv:idIdrefTable xsi:nil='true'/>
    <psv:identityConstraintTable xsi:nil='true'/>
  </element>

The pointer elements refer to XML representations of the
element/attribute declarations included further down the XML
representation, which may point to global type representations, or
have anonymous ones nested within them. There are also pointers
indicating the base type of each type, so you can follow the
type hierarchy.

The PSVI XML output from XSV always contains XML representations of
all the built-in XML Schema data types, so it's always very long, but
it's quite cool for seeing exactly how XSV is interpreting your XML.
And of course it would be possible to use it as input to a
stylesheet...

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



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.