M
melograno
Sorry if this question or a similar one was already submitted into
this newsgroup, but my investigations on this topic were not
successfull.
An external application that is not under my control generates an XML
documents with 5 fields. 3 of them (f1, f3, f5) are mandatory, 2 of
them (f2 and f4) are optionals. The field order is unpredictable. A
couple of examples follow.
<?xml version="1.0"?>
<thedocument>
<f1>11</f1>
<f3>13</f3>
<f5>14</f5>
<f2>15</f2>
</thedocument>
<?xml version="1.0"?>
<thedocument>
<f4>11</f4>
<f1>12</f1>
<f5>13</f5>
<f3>14</f3>
</thedocument>
I'm trying to define an XSD for this legacy document, but
- sequence does not work, since the order is not fixed
- all does not work, since some of elements are optional
- sequence of choice does not work
Do you have any suggestion for solving this problem?
Thanks
pierre
this newsgroup, but my investigations on this topic were not
successfull.
An external application that is not under my control generates an XML
documents with 5 fields. 3 of them (f1, f3, f5) are mandatory, 2 of
them (f2 and f4) are optionals. The field order is unpredictable. A
couple of examples follow.
<?xml version="1.0"?>
<thedocument>
<f1>11</f1>
<f3>13</f3>
<f5>14</f5>
<f2>15</f2>
</thedocument>
<?xml version="1.0"?>
<thedocument>
<f4>11</f4>
<f1>12</f1>
<f5>13</f5>
<f3>14</f3>
</thedocument>
I'm trying to define an XSD for this legacy document, but
- sequence does not work, since the order is not fixed
- all does not work, since some of elements are optional
- sequence of choice does not work
Do you have any suggestion for solving this problem?
Thanks
pierre