OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Types and Context

On 23 May 2001 10:17:52 +0100, Jeni Tennison wrote: 
> > 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>

I knew that was _an_ answer, but I can't say I consider it practical or
useful, except as an illustration of how far off the deep end XML Schema
1.0 has gone with (what I see as) a misguided approach to defining the
world through types.

Remember those people who think XML is already way too verbose?

Makes me downright nostalgic for Datatypes for DTDs (DT4DTD):

<foo myInt="123" a-dtype="myInt int"/>

> 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.

Yes, but I can't say I've ever found this information worth the
complexity cost.  Feature for some, inflicted on many.

> 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...

But it's damn near worthless for interchange.  Usable, but verbose even
by XML standards.  Thanks for presenting it, but all it does for me is
illustrate once again how ugly the problem is.