Re: SOAP and WSDL and inheritance by restriction

Jeni Tennison wrote:

> Hi James,
>
> > However, you will notice the wsdl:arrayType attribute on the definition
> > of this attribute. The WSDL spec describes it as follows:
> >
> >   At the time of this writing, the XSD specification does not have a
> >   mechanism for specifying the default value of an attribute which
> >   contains a QName value. To overcome this limitation, WSDL introduces
> >   the arrayType attribute (from namespace
> >   http://schemas.xmlsoap.org/wsdl/) which has the semantic of
> >   providing the default value. If XSD is revised to support this
> >   functionality, the revised mechanism SHOULD be used in favor of the
> >   arrayType attribute defined by WSDL.
> >
> > Was such a mechanism ever added to the schema specification?
>
> QNames are a little underspecified in XML Schema Part 2 - specifically
> there's no 'canonical lexical representation' of a QName - but I'm
> pretty sure that the intention is that you should be able to use
> QNames in the default attribute of xs:attribute just as you can any
> other value.

Jeni,

As I know, the value of "default" attribute has a type "string", not "QName".

So, I don't think any Schema processor will try to resolve any QName's
contained in the default attribute value before adding it to the associated
element instance!  Note that both "ref" and "type" attributes are of type
QName.

<attribute
               default = string
               fixed = string
               form = (qualified | unqualified)
               id = ID
               name = NCName
               ref = QName
               type = QName
               use = (optional | prohibited | required) : optional
               {any attributes with non-schema namespace . . .}>
               Content: (annotation?, (simpleType?))
</attribute>

>
>
> The prefix in the default QName should get resolved relative to the
> namespace declarations in scope for the xs:attribute element in the
> schema, rather than the namespace declarations in scope for the
> attribute instance in the instance document (in other words, treat it
> as a QName not a literal string), but I think that's the only thing
> you need to watch out for.
>
> Cheers,
>
> Jeni
>
> ---
> Jeni Tennison
> http://www.jenitennison.com/

Received on Wednesday, 12 December 2001 14:28:34 UTC