OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XML Schemas

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: XML Schemas
  • From: Richard Lainchbury <freexe@gmail.com>
  • Date: Thu, 27 Oct 2005 10:34:34 +0100
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=M5ppQzqJxPVPDXqPteXl6JACTuX8dbXBCJJylot3CPdZH2Pj55A1NV/nnvATvv42/ZFgCG4lRrB1LwCoAjS65ZQglNEuuZIed9zOfzRfAvQYi7aBGiH+8FfybStvlU6yC+mfHkfabLpFZdrjTku4aNOhbOy31mdHXGJZTbtdJnE=

Hey world,

I've got a Schema question for you that has been taxing me for while.


If I have a xml document that looks like

<?xsl version="1.0"?>
<content>
     <element type="one">
           <file>This is only allowed if the element has @type equal
to one</file>
    </element>
    <element type="two">
           <text>This element is only allowed if the element has @type
= 'two'</text>
    </element>
</content>

Is it possible to put this restriction like this on with a schema? I
have looked around for any kind of a hint at a solution but have
gotten nowhere!

Is it even possible to put restrictions based on attributes?

Now I know I can just use a different element but what would i do if i
was writing this schema to valid a section of xhtml where you can have
<input type="submit"/> and <input type="file"/> which have complety
different requirements?


Thanks in adavance for any help you can give me :)
Richard




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS