Oxygen XML Editor
 
[XML-DEV Mailing List Archive Home] [By Thread] [By Date]

RE: [xml-dev] Selective restriction for attributes based on element values.


  • From: "Michael Kay" <mike@...>
  • To: <NageshBlore@...>,<xml-dev@...>
  • Date: Sun, 30 Sep 2007 10:24:31 +0100

Is this a question about XML Schema, by any chance?

It's a well-known restriction in XML Schema 1.0 that the type for one
attribute/element can't depend on the value of another. There are proposals
to fix this in 1.1 - one would need a more detailed description of the rules
in your case to see whether they handle this.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Nagesh Subrahmanyam [mailto:nageshblore@...] 
> Sent: 30 September 2007 09:08
> To: xml-dev@...
> Subject: [xml-dev] Selective restriction for attributes based 
> on element values.
> 
> Hi,
> I have an element <startTag> with attribute as type. The 
> value of the attribute type can be numeric or alphabetic 
> (with or without limits and/or patterns) depending on what 
> was the value of the element. The value of the element would 
> be string always. How do I apply such a restriction for the 
> attribute ?
> 
> Examples :
>    <startTag type="x">op1</startTag>
>    <startTag type="0">op2</startTag>
> 
> Regards,
> Nags.
> 
> ______________________________________________________________
> _________
> 
> XML-DEV is a publicly archived, unmoderated list hosted by 
> OASIS to support XML implementation and development. To 
> minimize spam in the archives, you must subscribe before posting.
> 
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@...
> subscribe: xml-dev-subscribe@... List archive: 
> http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor
Keywords