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


Help: OASIS Mailing Lists Help | MarkMail Help

wsn message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: messageTypes - interesting XSD question

I have been looking at the messageTypes attribute that appears in the 
<ws:Topic> element. We state that this attribute contains a list of Global Element QNames, identifying the element name/type of Notification Messages that can be sent on the given Topic. If you don't want to restrict the set of possible messages, you can code the QName "xsd:any". 

So far so good, now for the tricky bit. We also say that the default (if the attribute is missing) is "xsd:any", and we attempt to specify this in the schema type definition for TopicType as follows: 

 <xsd:attribute name="messageTypes" default="xsd:any">
            <xsd:list itemType="xsd:QName"/>

My question concerns the time when the xsd: prefix on the quoted "xsd:any" is resolved. 

When I am parsing an instance document that omits messageType, does the messageType default to a literal string "xsd:any", or does it default to "any" from the XML schema namespace? I suspect it might be the former, in which case I would only get the desired result if I happen to have an xmlns: declaration for xsd in scope in my instance document that is pointing to the XML schema namespace. If this turns out to be the case I think we have to change the schema, since I don't think we can require someone to code a specific namespace prefix in their instance document.

Can anyone answer this question?

The safest approach might be to remove the default="xsd:any" from the schema, and just note that it is the default in the text of the specification. Would this cause any loss of usability? 

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]