Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Finding possible values for enumerations from XSD
Finding possible values for enumerations from XSD [message #76094] Thu, 30 October 2008 02:06 Go to next message
Etienne is currently offline Etienne
Messages: 4
Registered: July 2009
Junior Member
I found this package after searching the web for something to help me
solve my problem:

I have an XML file that a user must edit and an XSD against which to
validate the resulting XML file.

I need to retrieve all the possible values for a field in this XML file
from a XSD file (to populate a dropdown with possible values for the end
user).

Can I use the functionality of this package to write something like that?
Or am I barking up the totally wrong tree here?

Any pointers would be much appreciated.

Etienne
Re: Finding possible values for enumerations from XSD [message #76113 is a reply to message #76094] Thu, 30 October 2008 06:50 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25925
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010608060201010304090100
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Etienne,

Try this tutorial:

Tutorial: Generating an EMF Model using XML Schema
< http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html>

The Web Tools project also as an XML editor that will validate the XML
against the XSD...


Etienne wrote:
> I found this package after searching the web for something to help me
> solve my problem:
>
> I have an XML file that a user must edit and an XSD against which to
> validate the resulting XML file.
> I need to retrieve all the possible values for a field in this XML
> file from a XSD file (to populate a dropdown with possible values for
> the end user).
>
> Can I use the functionality of this package to write something like
> that? Or am I barking up the totally wrong tree here?
>
> Any pointers would be much appreciated.
>
> Etienne
>

--------------010608060201010304090100
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Etienne,<br>
<br>
Try this tutorial:<br>
<blockquote><a
href=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html">Tutorial:
Generating an EMF Model using XML Schema</a><br>
</blockquote>
The Web Tools project also as an XML editor that will validate the XML
against the XSD...<br>
<br>
<br>
Etienne wrote:
<blockquote
cite="mid:7e99eee69ea3033a3802f4695618a978$1@www.eclipse.org"
type="cite">I found this package after searching the web for something
to help me solve my problem:
<br>
<br>
I have an XML file that a user must edit and an XSD against which to
validate the resulting XML file.
Re: Finding possible values for enumerations from XSD [message #76127 is a reply to message #76113] Thu, 30 October 2008 09:46 Go to previous messageGo to next message
Etienne is currently offline Etienne
Messages: 4
Registered: July 2009
Junior Member
Thanks for the prompt reply.

I will work through the tutorial and see how I can apply that to my code.

By the way, the code I am writing will be exposed as a service to be used
by a front end that is not even written in Java.

My service must take the XSD and XML tag path as inputs and then return
all the valid values for that tag as output.

So, even though I'll be looking at the Eclipse editor functionality this
project gives me (for myself), my code will not be used in an Eclipse
environment.

I'm currently using the built-in Java XSD validation functionality, but
will definately be looking at this project's functionality for XML
validation against an XSD as it may give me less criptic feedback in the
case of failing validation than the standard Java libraries.

Thanks
Etienne
Re: Finding possible values for enumerations from XSD [message #76142 is a reply to message #76127] Thu, 30 October 2008 11:58 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25925
Registered: July 2009
Senior Member
Etienne,

Comments below.

Etienne wrote:
> Thanks for the prompt reply.
>
> I will work through the tutorial and see how I can apply that to my code.
>
> By the way, the code I am writing will be exposed as a service to be
> used by a front end that is not even written in Java.
>
> My service must take the XSD and XML tag path as inputs and then
> return all the valid values for that tag as output.
So you'll write your service in Java, but it will be used by some other
service that's not written in Java. You'll just exchange XML.
> So, even though I'll be looking at the Eclipse editor functionality
> this project gives me (for myself), my code will not be used in an
> Eclipse environment.
EMF works standalone just on the Java classpath. So does the generated
model. And the XSD model too...
> I'm currently using the built-in Java XSD validation functionality,
> but will definately be looking at this project's functionality for XML
> validation against an XSD as it may give me less criptic feedback in
> the case of failing validation than the standard Java libraries.
The XSD model is mostly focused on validating XSD instances, not so
much on validating XML documents whether they conform to the XSD.
>
> Thanks
> Etienne
>
>
>
Re: Finding possible values for enumerations from XSD [message #603396 is a reply to message #76094] Thu, 30 October 2008 06:50 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25925
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010608060201010304090100
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Etienne,

Try this tutorial:

Tutorial: Generating an EMF Model using XML Schema
< http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html>

The Web Tools project also as an XML editor that will validate the XML
against the XSD...


Etienne wrote:
> I found this package after searching the web for something to help me
> solve my problem:
>
> I have an XML file that a user must edit and an XSD against which to
> validate the resulting XML file.
> I need to retrieve all the possible values for a field in this XML
> file from a XSD file (to populate a dropdown with possible values for
> the end user).
>
> Can I use the functionality of this package to write something like
> that? Or am I barking up the totally wrong tree here?
>
> Any pointers would be much appreciated.
>
> Etienne
>

--------------010608060201010304090100
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Etienne,<br>
<br>
Try this tutorial:<br>
<blockquote><a
href=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html">Tutorial:
Generating an EMF Model using XML Schema</a><br>
</blockquote>
The Web Tools project also as an XML editor that will validate the XML
against the XSD...<br>
<br>
<br>
Etienne wrote:
<blockquote
cite="mid:7e99eee69ea3033a3802f4695618a978$1@www.eclipse.org"
type="cite">I found this package after searching the web for something
to help me solve my problem:
<br>
<br>
I have an XML file that a user must edit and an XSD against which to
validate the resulting XML file.
Re: Finding possible values for enumerations from XSD [message #603400 is a reply to message #76113] Thu, 30 October 2008 09:46 Go to previous message
Etienne is currently offline Etienne
Messages: 4
Registered: July 2009
Junior Member
Thanks for the prompt reply.

I will work through the tutorial and see how I can apply that to my code.

By the way, the code I am writing will be exposed as a service to be used
by a front end that is not even written in Java.

My service must take the XSD and XML tag path as inputs and then return
all the valid values for that tag as output.

So, even though I'll be looking at the Eclipse editor functionality this
project gives me (for myself), my code will not be used in an Eclipse
environment.

I'm currently using the built-in Java XSD validation functionality, but
will definately be looking at this project's functionality for XML
validation against an XSD as it may give me less criptic feedback in the
case of failing validation than the standard Java libraries.

Thanks
Etienne
Re: Finding possible values for enumerations from XSD [message #603407 is a reply to message #76127] Thu, 30 October 2008 11:58 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25925
Registered: July 2009
Senior Member
Etienne,

Comments below.

Etienne wrote:
> Thanks for the prompt reply.
>
> I will work through the tutorial and see how I can apply that to my code.
>
> By the way, the code I am writing will be exposed as a service to be
> used by a front end that is not even written in Java.
>
> My service must take the XSD and XML tag path as inputs and then
> return all the valid values for that tag as output.
So you'll write your service in Java, but it will be used by some other
service that's not written in Java. You'll just exchange XML.
> So, even though I'll be looking at the Eclipse editor functionality
> this project gives me (for myself), my code will not be used in an
> Eclipse environment.
EMF works standalone just on the Java classpath. So does the generated
model. And the XSD model too...
> I'm currently using the built-in Java XSD validation functionality,
> but will definately be looking at this project's functionality for XML
> validation against an XSD as it may give me less criptic feedback in
> the case of failing validation than the standard Java libraries.
The XSD model is mostly focused on validating XSD instances, not so
much on validating XML documents whether they conform to the XSD.
>
> Thanks
> Etienne
>
>
>
Previous Topic:Finding possible values for enumerations from XSD
Next Topic:xsd.ecore is not based on ecore.ecore
Goto Forum:
  


Current Time: Mon Jul 28 08:40:24 EDT 2014

Powered by FUDForum. Page generated in 0.02476 seconds