[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML Schemas

  • To: xml-dev@l...
  • Subject: XML Schemas
  • From: Richard Lainchbury <freexe@g...>
  • 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=

XML Schemas
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.