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

 


Help: OASIS Mailing Lists Help | MarkMail Help

search-ws message

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


Subject: use XML Schema language for response description


Picking up where I left off ....

This is a fragment from the XML I sent yesterday:
--------------------------------
<element>
<abstractName>numberOfItems</abstractName>
<actualName> numberOfRecords</actualName>
<occurrence>1</occurrence>
<xpath>/numberOfRecords</xpath>
<value>positiveInteger</value>
</element>
----------------------------
All except  <xpath> and <abstractName> are representable by a single line
using XML Schema language:

-----------------------------------------------------------------
<xs:element name="numberOfRecords" minOccurs="1" maxOccurs="1"
type="xs:positiveInteger"/>
------------------------------------------------------------------

The following is a bit more complicated because of the "value" restriction:

-----------------------------------
<element>
<abstractName>version</abstractName>
<actualName> version</actualName>
<occurrence>1</occurrence>
<xpath>/version</xpath>
<value>"1.2"</value>
</element>
----------------------------------------

This can be represented via XML Schema language as follows:

--------------------------------------------------------------
<xs:element name="version" minOccurs="1" maxOccurs="1" type="xs:string">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="1.2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
--------------------------------------------------------------

So I would like to explore using XML Schema as the language to represent our
response, when the response is XML.  Seems to me like a pretty
straightforward approach.   The <xpath> element becomes moot, since the
schema language can well represent the structure.  The only problem is to
represent the "abstract name".   We can do this by introducing an
abstractName element with a different namespace (e.g. sws:abstractName).

What do you think of this approach?

It does leave unanswered the question I raised yesterday about assigning
abstract elements for subelements.   Please give some thought to that.

--Ray












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