Hi Amila,

xs:QName has a very particular property, which is that there is no
functional mapping between its lexical space and its value space: to
translate a QName literal into a QName value, it is necessary to know
the namespace context, i.e. the set of namespace declarations in scope
for the context where the QName is used (see [1] for a more extensive
discussion).

Looking at the WS-Discovery specs, "list of xs:QName" seems to be
defined as a white-space separated list of QName literals. It
therefore inherits the feature described above. There are other
examples of types having this property, e.g. XPath expressions.

Among all these examples, only the QName type is defined by the XML
schema specs and can be processed by a validating parser. It therefore
makes sense to have support for it in Axiom. For all other types
(including "list of xs:QName"), you will need to handle them yourself,
i.e. add the necessary namespace bindings and produce the literal
value.

Andreas

[1] 
http://veithen.blogspot.com/2009/10/xml-schema-oddity-covariant-literals.html

On Fri, Dec 4, 2009 at 13:08, Amila Suriarachchi
<amilasuriarach...@gmail.com> wrote:
> hi,
>
> According to discovery spec, a probe message looks like this,
>
> <d:Probe ... >
>    <d:Types>list of xs:QName</d:Types>
>    <d:Scopes [MatchBy="xs:anyURI"]? ... >list of xs:anyURI</d:Scopes>
> </d:Probe>
>
> How can I create this message with axiom?
>
> As I saw an OMElement has a method called setText which takes only one QName
> as an argument.
>
> thanks,
> Amila.
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com
>

Reply via email to