[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Types and Context
- From: Jeni Tennison <mail@jenitennison.com>
- To: "Simon St.Laurent" <simonstl@simonstl.com>
- Date: Wed, 23 May 2001 10:17:52 +0100
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/