W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

A XPath expresion

From: Joan Pujol <joan.pujol@ima.udg.es>
Date: Tue, 30 Oct 2001 17:29:40 +0100
Message-ID: <3BDED574.E67CB770@ima.udg.es>
To: xmlschema-dev@w3.org

I need a XPath for Selector that selects:
*|Group|Group/Group|Group/Group/Group|... etc.

Can I write it with the Xpath Subset for Schemas?

I explain my problem because if it ins't possible maybe there is a workarround
or another way to solution the problem.

I write a Schema for a Generic Structured model of data:
Basically I have two elements: Struct and Scalar. (I have more but, it isn't
important for the problem...)

Each Struct or Scalar is identified with a name attribute. The name must be
unique in his 'namespace'.
Struct contains Scalars, and provides a diferent namespace for the scalars that
Structs can be nested.

I write a Schema for this, and I have no problem to set the Identity
The problem starts when I introduce another element: Group.
Group is like Struct but it is neutral for validation, it is only used to group
elements and set common attributes for visualitzation, etc...
In another words, Group don't provide a namespace for the elements that

That's because I need the Xpath expresion of the begining.

I put an exemple because my english is poor, and I can't explain better.

This break my rules, because Group don't provide a namespace and there are two
elements with the same name:
<Struct name='Film'>
	<Scalar name='Title'>
	<Group name='Group1'>
		<Scalar name='Title'>
but this don't:
Because the struct provides another 'namespace' for his children elements.
<Struct name='Film'>
	<Scalar name='Title'>
	<Struct name='Struct1'>
		<Scalar name='Title'>

Can I expresse it with Schema Identity Constraints?


Joan Jesús Pujol Espinar
PTS Sistemes Departament IMA
Received on Tuesday, 30 October 2001 11:30:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:55 UTC