2 years ago

#48140

test-img

kano

XSD building other complexTypes according to attribute

i am new to xsd and xml and would like to implement the following schema

 <vitalparameters>
      <vitalparameter Measurement="ekg">
           <p-wave unit="mm">20</p-wave>
           etc...
      </vitalparameter>

     <vitalparameter Measurement="blood pressure">
           <systolic unit="mmHg">124</systolic>
           etc...
      </vitalparameter>
 </vitalparameters>

my idea was that the content of "vitalparameter" depends on the Measurement attribute. If it is "ekg" the element should contain other elements than the Measurement "blood pressure". Is this in this way possible ?

xml

xsd

xsd-validation

0 Answers

Your Answer

Accepted video resources