W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2008

Schema Newbie Boxed in a corner . . .

From: Frank Merrow <fmerrow@qualcomm.com>
Date: Fri, 25 Apr 2008 13:45:17 -0700
Message-Id: <200804252045.m3PKjKoT016255@msgtransport03.qualcomm.com>
To: xmlschema-dev@w3.org
So I am writing my first Schema and a little lost.

The heart of the existing file I am trying to write a schema for 
looks something like this:

<AI00020000 type='faq'>223</AI00020000>

So in effect the "element name" is a database key and the set of keys 
is constantly expanding.

Based on my limited understanding of XSD, this cannot be done.

The problem here is that new "elements" are going to be showing up 
all the time.

If the data had been structured like this:

<aitags id='AI00020000' type='faq'>223</aitags>

Then I think I could have made it work and then put a validation on 
"id" to enforce "AI" followed by exactly 8 decimal digits.

However, that I can see, there is no way to declare a "set of 
elements whose names all start with AI followed by 8 decimal digits".

My read of the schema docs suggest XSD just are not setup to do that.

Am I correct?  Or is there some way to describe this without having 
to add something to the XSD file every time a new key is added to the XML file?

Received on Saturday, 26 April 2008 02:25:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:46 UTC