Schema Newbie Boxed in a corner . . .

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>
<AI00020001 
type='wiki'>Debugging_Problems_with_APS_Closing_Log_Files</AI00020001>
<AI00020002 
type='wiki'>Doing_Proper_Error_Recovery_for_RawRequestResponse</AI00020002>

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?

Frank

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