Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » one XML element value as other xml element value(XML element value)
icon5.gif  one XML element value as other xml element value [message #905904] Fri, 31 August 2012 09:36 Go to next message
bala ganapathi is currently offline bala ganapathiFriend
Messages: 2
Registered: August 2012
Junior Member
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 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: one XML element value as other xml element value [message #905919 is a reply to message #905914] Fri, 31 August 2012 10:03 Go to previous messageGo to next message
bala ganapathi is currently offline bala ganapathiFriend
Messages: 2
Registered: August 2012
Junior Member
Thanks for your reply ED
Could you suggest some best reference site for writing .xsd


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 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:How to generate XSD from XML, by restricting all the values ?
Next Topic:Schema default value not honored for complex type
Goto Forum:
  


Current Time: Thu Apr 25 22:05:26 GMT 2024

Powered by FUDForum. Page generated in 0.03539 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top