Next in thread → Next in month →

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

From
Michael Kay <>
To
,
Date
2007-09-30T09:24:31Z
ID
<008101c80343$b56f6dd0$6401a8c0@turtle>
Thread
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:] 
> Sent: 30 September 2007 09:08
> To: 
> 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: 
> subscribe:  List archive: 
> http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
Next in thread → Next in month →