xsl-list
[Top] [All Lists]

Creation of DTD

2005-08-19 06:24:25
I not quite sure if creation of DTD's is out of the scope of this
list, if so kindly point me in the right decision.

My problem is, first I am a bit rusty in writing DTD's, second, I not
even sure I can do what I want with a DTD, perhaps a Schema was more
appropriate.

The scenario is as follows. From a system, I get a CSV file, which is
converted into a XML file, like:
<data>
        <row count="1">
                <item name="Price">5</item>
                <item name="Item">Football</item>
                <item name="SKU">1010</item>
        </row>
        <row count="2">
                <item name="Price">15</item>
                <item name="Item">Basket Ball</item>
                <item name="SKU">1012</item>
        </row>
        <row count="n">
                <item name="Price">10</item>
                <item name="Item">ball</item>
                <item name="SKU"></item>
        </row>
</data>

What I would like to do, is to make a DTD so I can check if the item
elements is present, and in that order. CSV is not at "strong" as XML,
and I would like to test up front, if the column names has been
changed in the CSV import.

But AFAIK, it is not possible to write a DTD that specifies the order
and requirements of the name attributes, or am I wrong?

/Thomas

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>