XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Selective restriction for attributes based on element values.

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@gmail.com] 
> Sent: 30 September 2007 09:08
> To: xml-dev@lists.xml.org
> 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@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org 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]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS