You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xml-commons-dev@xerces.apache.org by Patrick Smith <pa...@redhat.com> on 2005/09/15 18:04:50 UTC

XML Schemas

Hi,

My teammate and I are currently working on a web based XML editor (that
extracts XML files from rars/jars/wars and ears) to configure
applications running on an application server while they're still
deployed.

One of the editor's views is a form based view. You can take a look at a
simple mock-up of the UI we are building at:
http://people.redhat.com/pasmith/third.html

We are required to validate the XML against its associated schemas.
Though we also need to get information from the schema for the UI.  For
example, if the schema specifies that only 3 specific elements can be
added as children to an element, then the form will have a drop down
menu with only those 3 options.  

My question is, are there any existing projects or APIs available that
will help in loading a schema and extracting such information.

At the moment we are already using Xerces for our XML processing and
validation.

Thanks a lot.

Patrick Smith


Re: XML Schemas [Xydra driving XHTML form to create XML document instance based on XML Schema]

Posted by Patrick Smith <pa...@redhat.com>.
Hi, thanks for your replies.
We'll look into Xydra and XMLSchema.

Thansk for your help!

Patrick Smith

On Thu, 2005-09-15 at 11:37 -0500, Aleksander Slominski wrote:
> Patrick Smith wrote:
> 
> >My teammate and I are currently working on a web based XML editor (that
> >extracts XML files from rars/jars/wars and ears) to configure
> >applications running on an application server while they're still
> >deployed.
> >
> >One of the editor's views is a form based view. You can take a look at a
> >simple mock-up of the UI we are building at:
> >http://people.redhat.com/pasmith/third.html
> >
> >We are required to validate the XML against its associated schemas.
> >Though we also need to get information from the schema for the UI.  For
> >example, if the schema specifies that only 3 specific elements can be
> >added as children to an element, then the form will have a drop down
> >menu with only those 3 options.  
> >
> >My question is, are there any existing projects or APIs available that
> >will help in loading a schema and extracting such information.
> >  
> >
> hi Patrick,
> 
> you may want to take a look on Xydra (under BSD-like license)
> 
> http://www.extreme.indiana.edu/xgws/xydra/
> 
>  - it has a simple version of what you have in your mockup (no arrays 
> but nested complexTypes are supported) and uses this functionality to 
> generate XML instance document to send to service described in WSDL - we 
> have used a special XML instance tree building code - XML schema was 
> parsed to generate sample XML instance with placeholders to fill data-in 
> and then XHTML form was generated with each field name having XPath like 
> address where form filed value should go into XML instance. on top of it 
> we experimented with Protege and intelligent defaults/learning. all 
> source code is available and maybe you find some of those ideas useful 
> in your work and i think having AJAX-enabled XHTML form to create XML 
> instance document guided by XML Schemas would be very cool ;-)
> 
> best,
> 
> alek
> 


Re: XML Schemas [Xydra driving XHTML form to create XML document instance based on XML Schema]

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Patrick Smith wrote:

>My teammate and I are currently working on a web based XML editor (that
>extracts XML files from rars/jars/wars and ears) to configure
>applications running on an application server while they're still
>deployed.
>
>One of the editor's views is a form based view. You can take a look at a
>simple mock-up of the UI we are building at:
>http://people.redhat.com/pasmith/third.html
>
>We are required to validate the XML against its associated schemas.
>Though we also need to get information from the schema for the UI.  For
>example, if the schema specifies that only 3 specific elements can be
>added as children to an element, then the form will have a drop down
>menu with only those 3 options.  
>
>My question is, are there any existing projects or APIs available that
>will help in loading a schema and extracting such information.
>  
>
hi Patrick,

you may want to take a look on Xydra (under BSD-like license)

http://www.extreme.indiana.edu/xgws/xydra/

 - it has a simple version of what you have in your mockup (no arrays 
but nested complexTypes are supported) and uses this functionality to 
generate XML instance document to send to service described in WSDL - we 
have used a special XML instance tree building code - XML schema was 
parsed to generate sample XML instance with placeholders to fill data-in 
and then XHTML form was generated with each field name having XPath like 
address where form filed value should go into XML instance. on top of it 
we experimented with Protege and intelligent defaults/learning. all 
source code is available and maybe you find some of those ideas useful 
in your work and i think having AJAX-enabled XHTML form to create XML 
instance document guided by XML Schemas would be very cool ;-)

best,

alek

-- 
The best way to predict the future is to invent it - Alan Kay


Re: XML Schemas

Posted by Davanum Srinivas <da...@gmail.com>.
Gregory,

please join the general AT ws.apache.org mailing list. (by sending an
email to general-subscribe@). Axis2 and Woden are beginning to use it.
Please post a stack trace and a pointer to the schema you are using
when u post your question to that mailing list.

Thanks,
dims

On 9/16/05, Gregory Lapouchnian <gl...@redhat.com> wrote:
> Hi Davanum,
> 
> Thanks for pointing us at XmlSchema. It looks like something we could
> really use for our project.
> 
> I've played around with it for a bit but I keep getting exceptions when
> I try to create an XmlSchema object using the SchemaBuilder class. I've
> tried a number of different schemas, some J2EE ones and some random ones
> Google found for me and all seem to throw one exception or other.
> 
> Is there an example somewhere which would show the proper usage of
> SchemaBuilder?
> 
> I found the thread on axis-dev regarding the donation of this module to
> Axis, however, it was more than two years ago. Is this project/module
> still being supported or used by any other Apache project?
> 
> Thanks in advance,
> Greg Lapouchnian.
> 
> On Thu, 2005-09-15 at 12:33 -0400, Davanum Srinivas wrote:
> > Try xmlschema...
> >
> > run "svn co http://svn.apache.org/repos/asf/webservices/commons/trunk/XmlSchema/"
> > to get the files.
> >
> > -- dims
> >
> > On 9/15/05, Patrick Smith <pa...@redhat.com> wrote:
> > > Hi,
> > >
> > > My teammate and I are currently working on a web based XML editor (that
> > > extracts XML files from rars/jars/wars and ears) to configure
> > > applications running on an application server while they're still
> > > deployed.
> > >
> > > One of the editor's views is a form based view. You can take a look at a
> > > simple mock-up of the UI we are building at:
> > > http://people.redhat.com/pasmith/third.html
> > >
> > > We are required to validate the XML against its associated schemas.
> > > Though we also need to get information from the schema for the UI.  For
> > > example, if the schema specifies that only 3 specific elements can be
> > > added as children to an element, then the form will have a drop down
> > > menu with only those 3 options.
> > >
> > > My question is, are there any existing projects or APIs available that
> > > will help in loading a schema and extracting such information.
> > >
> > > At the moment we are already using Xerces for our XML processing and
> > > validation.
> > >
> > > Thanks a lot.
> > >
> > > Patrick Smith
> > >
> > >
> >
> >
> --
> Gregory Lapouchnian <gl...@redhat.com>
> Red Hat Canada
> 
> 


-- 
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform

Re: XML Schemas

Posted by Gregory Lapouchnian <gl...@redhat.com>.
Hi Davanum,

Thanks for pointing us at XmlSchema. It looks like something we could
really use for our project.

I've played around with it for a bit but I keep getting exceptions when
I try to create an XmlSchema object using the SchemaBuilder class. I've
tried a number of different schemas, some J2EE ones and some random ones
Google found for me and all seem to throw one exception or other.

Is there an example somewhere which would show the proper usage of
SchemaBuilder?

I found the thread on axis-dev regarding the donation of this module to
Axis, however, it was more than two years ago. Is this project/module
still being supported or used by any other Apache project?

Thanks in advance,
Greg Lapouchnian.

On Thu, 2005-09-15 at 12:33 -0400, Davanum Srinivas wrote:
> Try xmlschema...
> 
> run "svn co http://svn.apache.org/repos/asf/webservices/commons/trunk/XmlSchema/"
> to get the files.
> 
> -- dims
> 
> On 9/15/05, Patrick Smith <pa...@redhat.com> wrote:
> > Hi,
> > 
> > My teammate and I are currently working on a web based XML editor (that
> > extracts XML files from rars/jars/wars and ears) to configure
> > applications running on an application server while they're still
> > deployed.
> > 
> > One of the editor's views is a form based view. You can take a look at a
> > simple mock-up of the UI we are building at:
> > http://people.redhat.com/pasmith/third.html
> > 
> > We are required to validate the XML against its associated schemas.
> > Though we also need to get information from the schema for the UI.  For
> > example, if the schema specifies that only 3 specific elements can be
> > added as children to an element, then the form will have a drop down
> > menu with only those 3 options.
> > 
> > My question is, are there any existing projects or APIs available that
> > will help in loading a schema and extracting such information.
> > 
> > At the moment we are already using Xerces for our XML processing and
> > validation.
> > 
> > Thanks a lot.
> > 
> > Patrick Smith
> > 
> > 
> 
> 
-- 
Gregory Lapouchnian <gl...@redhat.com>
Red Hat Canada


Re: XML Schemas

Posted by Davanum Srinivas <da...@gmail.com>.
Try xmlschema...

run "svn co http://svn.apache.org/repos/asf/webservices/commons/trunk/XmlSchema/"
to get the files.

-- dims

On 9/15/05, Patrick Smith <pa...@redhat.com> wrote:
> Hi,
> 
> My teammate and I are currently working on a web based XML editor (that
> extracts XML files from rars/jars/wars and ears) to configure
> applications running on an application server while they're still
> deployed.
> 
> One of the editor's views is a form based view. You can take a look at a
> simple mock-up of the UI we are building at:
> http://people.redhat.com/pasmith/third.html
> 
> We are required to validate the XML against its associated schemas.
> Though we also need to get information from the schema for the UI.  For
> example, if the schema specifies that only 3 specific elements can be
> added as children to an element, then the form will have a drop down
> menu with only those 3 options.
> 
> My question is, are there any existing projects or APIs available that
> will help in loading a schema and extracting such information.
> 
> At the moment we are already using Xerces for our XML processing and
> validation.
> 
> Thanks a lot.
> 
> Patrick Smith
> 
> 


-- 
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform

Re: XML Schemas

Posted by sh...@us.ibm.com.
The other obvious, although heavyweight answer, is to look into the 
Eclipse EMF and XSD tools, which give a ton of information about schemas, 
and support auto-generating code to create editors for a schema (although 
not, perhaps, as simply editable code as your application needs).  It's 
worth skimming the docs tho.

http://eclipse.org/emf/xsd.php

- Shane