Re: variables as nodes? (re: XML Binding Format)

On Mar 22, 2005, at 2:09 PM, Howard Katz wrote:

> Bijan,
> Can you briefly explain why the attribute form is more "XML Schemable" 
> than
> the element form?

I'm no schema wonk (which is fine, btw :)), but looking at:

   <xs:element name="result">
     <xs:complexType>
       <xs:group minOccurs="0" maxOccurs="unbounded" ref="res:var"/>
       <xs:attribute ref="xml:lang"/>
     </xs:complexType>
   </xs:element>
   <xs:group name="var">
     <xs:sequence>
       <xs:any namespace="##targetNamespace" processContents="skip"/>
     </xs:sequence>
   </xs:group>

That processContents="skip" is a consequence of not having a fixed set 
of names for the binding forms and that is unfortunate.

I would prefer for the element children of resutls to be fixed and data 
bindable. I would also like to use xsi:type to enforce schema 
processing of their children.

Heck. It'd be nice to be able to distinguish bindings with a node vs. a 
literal content. If we can't distinguish by attribute value, then i'd 
be in favor of things like nodeVar, literalVar, etc.

I do not yet intend this as a proposal. I hope to flesh it out a bit 
more. Deadlines and illness have interceded a bit.

But even the little bit more schema processing seems worth it to me.

I did some experiments with kendall on Dave's example transform scripts 
to HTML tables, and it doesn't complicate them significantly (to my 
eye). Also, you can, in XQuery, use typecase (or whatever it's called) 
which might have optimization and safety advantages.

Cheers,
Bijan.

Received on Tuesday, 22 March 2005 20:06:51 UTC