Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Newbie: Question about XSD

From: "Mathieu Malaterre" <mathieu.malaterre@-----.--->
To: xmlschema-dev@--.---
Date: 7/10/2008 3:52:00 PM
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.

A.
  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" />


B.
  I have to manipulate entry which value can be multiple, how would do that ?
1. As attribute:
<entry>1,2,3</entry>

2. As element:
<entry>
  <value>1</value>
  <value>2</value>
  <value>3</value>
</entry>

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

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

Or:
2.
<sequence group-element="1234,5678">
  <entry group-element="0010,0010">foobar</entry>
</sequence>


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 !
-- 
Mathieu


From mathieu.malaterre@g... Mon Jul 14 00:30:02 2008
Received: from farnsworth.w3.org ([128.30.52.43] helo=wiggum.w3.o


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent