Re: table setup

Opps, I had the layout wrong.  This is what I have:

The schema I am working on contains a table.  The number of rows and
meaning of the rows can change.  I would like to list and describe
the rows in the xml and then have the schema enforce those rows in
the schema.  The xml might look like this where the columnDef
element is the definition of the columns and the columnDef name
attribute is the name of the column element:

<doc>
        <colInfo>
                <columnDef name="col1">1st Column</columnDef> 
                <columnDef name="col2">2nd Column</columnDef>
                <columnDef name="col3">3rd Column</columnDef>
        </colInfo>
        <data>
                <item>
                        <name>an item</name>
                        <col1>something</column>  
                        <col2>something</column>
                        <col3>something</column>  
                </item>
                <item>
                        <name>an item</name>
                        <col1>something</column>  
                        <col2>something</column>
                        <col3>something</column>  
                </item>
                <item>
                        <name>an item</name>
                        <col1>something</column>  
                        <col2>something</column>
<!--  this one would be invalid because it is missing col3 -->
                </item>
        </data>
</doc>

Can this be enforced through a schema?  If so, how?

Sam

Received on Friday, 27 June 2003 16:14:21 UTC