one XML element value as other xml element value [message #905904] |
Fri, 31 August 2012 09:36  |
Eclipse User |
|
|
|
Hi All,
Am having an XML file which looks like the following,
<param-attribute>
<attribute-name>Activate</attribute-name>
</param-attribute>
<param-attribute>
<attribute-name>De-Activate</attribute-name>
</param-attribute>
<Service>
<action>
<param>Activate</param>
<param>De-Activate</param>
</action>
</Service>
Here the <param> element value "Activate" which is a value of element <attribute-name>
How to ensure in XSD, the <param> element value can be value of any one of <attribute-name> element value?
Please help me on writing .XSD for this validation.
Eagarly awaiting for response from XSD gurus ...
Thanks,
Balagan.
|
|
|
Re: one XML element value as other xml element value [message #905914 is a reply to message #905904] |
Fri, 31 August 2012 09:51   |
Eclipse User |
|
|
|
Balagan,
You might be able to so something like that with keyref, but I'm not
sure how. This forum isn't intended for general help writing XML
Schemas but rather specific help for using Eclipse's XSD API to read,
write, and analyze schemas programmatically.
On 31/08/2012 11:36 AM, bala ganapathi wrote:
> Hi All,
>
> Am having an XML file which looks like the following,
>
> <param-attribute>
> <attribute-name>Activate</attribute-name>
> </param-attribute>
> <param-attribute>
> <attribute-name>De-Activate</attribute-name>
> </param-attribute>
> <Service>
> <action>
> <param>Activate</param>
> <param>De-Activate</param>
> </action>
> </Service>
>
> Here the <param> element value "Activate" which is a value of element
> <attribute-name>
>
> How to ensure in XSD, the <param> element value can be value of any
> one of <attribute-name> element value?
>
> Please help me on writing .XSD for this validation.
>
> Eagarly awaiting for response from XSD gurus ...
>
> Thanks,
> Balagan.
|
|
|
|
Re: one XML element value as other xml element value [message #905951 is a reply to message #905919] |
Fri, 31 August 2012 11:00  |
Eclipse User |
|
|
|
I'm not sure. I personally only focused on the specification when
implement it. I'd have to Google to answer your question and you can do
that as well as me.
On 31/08/2012 12:03 PM, bala ganapathi wrote:
> Thanks for your reply ED Could you suggest some best reference site
> for writing .xsd
>
> Thanks,
> Balagan.
|
|
|
Powered by
FUDForum. Page generated in 0.02761 seconds