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

Newbie: Question about XSD

From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
Date: Fri, 11 Jul 2008 12:40:03 +0200
Message-ID: <bf0c3b3f0807110340r72144b7ar3c4fd2a16995a6d1@mail.gmail.com>
To: xmlschema-dev@w3.org

Hi there,

 Please apologize if those are really simple questions. If someone
could suggest a beginer tutorial for XSD, I'd appreciate.

 I would like to convert from DICOM (a file format used in medical
fields) to XML, the goal being that I can then validate (using XSD)
this output XML. Thus I have the control over the XML layout to be
tailorded specifically for XSD validation.

 In my document I have a set of entries defined by a pair of unsigned
short (unique within a document). How would one represent them in XML

1. Separate them:
<entry group="0010" element="0010" />
2. Group them:
<entry group-element="00100010" />
2. Group them with comma:
<entry group-element="0010,0010" />

 I have to manipulate entry which value can be multiple, how would do that ?
1. As attribute:

2. As element:

 What if an entry contains other entry ? Should it be a different attribute ?

<entry group-element="1234,5678"> <!-- special group-element value -->
 <entry group-element="0010,0010">foobar</entry>

<sequence group-element="1234,5678">
 <entry group-element="0010,0010">foobar</entry>

D. Is there a way to express that a particular entry (let say
0010,0010) must be present, but value is allowed to be empty.

E. Bonus question (might not be that important):
 What happen if one of the <entry> contains a jpeg file ? Is there
anything that can be done to validate it with some kind of external
codec ?

Thanks !
Received on Monday, 14 July 2008 00:30:02 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:14 UTC