[infod-wg] xsd:string and xsd:any types

Stephen Davey sdavey at nesc.ac.uk
Fri Jun 9 11:02:38 CDT 2006


Hi everyone,

Here are some notes on the xsd:string and the xsd:any data types.

As I mentioned during the telcon, I think that the xsd:any type should
be used when arbitrary xml needs to be included - such as when defining
a vocabulary in the CreatePropertyVocab interface function. I would
guess that (all???) XQuerys can be expressed as just strings? I could be
completely wrong though! Looking at some examples from WS-Topics (see
below), it seems to use xsd:any for the TopicExpressions but they can be
in any dialect I think. Which would therefore argue that the
DataConstraints and DynamicConsumerConstraints should also be xsd:any as
well.

 

I'll try to make a pass at these changes (and review comments) in the
interface spec next.

Cheers, Stephen.

 

String Data Type

The string data type can contain characters, line feeds, carriage
returns, and tab characters.

The following is an example of a string declaration in a schema:

<xs:element name="customer" type="xs:string"/>

An element in your document might look like this:

<customer>John Smith</customer>

Or it might look like this:

<customer>     John Smith     </customer>

Note: The XML processor will not modify the value if you use the string
data type.

 

The <any> Element

The <any> element enables us to extend the XML document with elements
not specified by the schema.

 

>From WS-Topics:

The use of {any} indicates the presence of an element wildcard
(<xsd:any/>). The use of @{any} indicates the presence of an attribute
wildcard (<xsd:anyAttribute/>).

 

/wstop:Topic/Topic

Declares a child Topic. A Topic may contain any number of child Topic
elements; however the value of the @name attribute of a child Topic must
be unique amongst all the child Topics of its immediate parent.

/wstop:Topic/{any}

This is an extensibility mechanism to allow additional elements to be
specified.

/wstop:Topic/@{any}

This is an extensibility mechanism to allow additional attributes to be
specified.

 

A topic expression has two components:

/wsnt:TopicExpression/@dialect

The dialect component contains a URI which identifies the type of
grammar used in the TopicExpression. This URI may be one from the set
defined in this document, or may be a URI defined elsewhere.

/wsnt:TopicExpression/{any}

The content of the TopicExpression is an expression in the grammar
defined by the expression language identified by the @dialect component.

 

 

 

------------------------------------------

Stephen Davey, 

NextGRID Software Architect 

National e-Science Centre,

15 South College Street,

Edinburgh, EH8 9AA, UK.

Tel: +44 131 650 9820

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/infod-wg/attachments/20060609/e71b8b33/attachment.html 


More information about the infod-wg mailing list