Home » Archived » XML Schema Definition (XSD) » Are there any docs for the XML Schema engine?
Are there any docs for the XML Schema engine? [message #72792] |
Thu, 02 August 2007 15:05  |
Eclipse User |
|
|
|
Originally posted by: user.domain.invalid
Dear All,
I am building a JSF/XForms engine & I am looking for an open source java
library which can ingest a schema & then for a given element produce a
list of what attributes & child elements can be added.
The Eclipse schema editor/viewer does this & I was wondering if there
were any docs detailing it or indeed which class/jar/lib I should be
looking at.
TIA
Adam
|
|
|
Re: Are there any docs for the XML Schema engine? [message #72801 is a reply to message #72792] |
Thu, 02 August 2007 15:33   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------090301080508090407030908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Adam,
Yes, you can use the XSD model for that. In fact, you might just want
to use EMF to convert the XML Schema to an Ecore model and generate the
APIs for that (or use EMF's dynamic capabilities. I know a couple of
folks have used this not only for the data models that XForms will
display, but also to generate the XForms model itself. The following
will be useful reading to understand how EMF and XSD can be used to help
implement your application.
Tutorial: Generating an EMF Model using XML Schema
< http://dev.eclipse.org/viewcvs/indextools.cgi/*checkout*/org .eclipse.emf/doc/org.eclipse.emf.doc/tutorials/xlibmod/xlibm od.html>
Binding XML to Java
< http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>
XML Schema to Ecore Mapping
< http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
Unfortunately XML Schema is grossly complex and so the APIs for the XSD
model are similarly very complex, but they effectively implement exactly
the abstract component model defined in the XML Schema specification, so
the should certainly meet your needs in terms of analyzing a schema in a
high level abstract way...
AdamF wrote:
> Dear All,
>
> I am building a JSF/XForms engine & I am looking for an open source
> java library which can ingest a schema & then for a given element
> produce a list of what attributes & child elements can be added.
>
> The Eclipse schema editor/viewer does this & I was wondering if there
> were any docs detailing it or indeed which class/jar/lib I should be
> looking at.
>
> TIA
>
> Adam
--------------090301080508090407030908
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Adam,<br>
<br>
Yes, you can use the XSD model for that. In fact, you might just want
to use EMF to convert the XML Schema to an Ecore model and generate the
APIs for that (or use EMF's dynamic capabilities. I know a couple of
folks have used this not only for the data models that XForms will
display, but also to generate the XForms model itself. The following
will be useful reading to understand how EMF and XSD can be used to
help implement your application.<br>
<blockquote><a
href=" http://dev.eclipse.org/viewcvs/indextools.cgi/*checkout*/org .eclipse.emf/doc/org.eclipse.emf.doc/tutorials/xlibmod/xlibm od.html">Tutorial:
Generating an EMF Model using XML Schema</a><br>
<a target="_out"
href=" http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava">Binding
XML to Java</a><br>
<a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf">XML
Schema to Ecore Mapping</a><br>
</blockquote>
Unfortunately XML Schema is grossly complex and so the APIs for the XSD
model are similarly very complex, but they effectively implement
exactly the abstract component model defined in the XML Schema
specification, so the should certainly meet your needs in terms of
analyzing a schema in a high level abstract way...<br>
<br>
<br>
AdamF wrote:
<blockquote cite="mid:f8srsp$dri$2@build.eclipse.org" type="cite">Dear
All,
<br>
<br>
I am building a JSF/XForms engine & I am looking for an open source
java library which can ingest a schema & then for a given element
produce a list of what attributes & child elements can be added.
<br>
<br>
The Eclipse schema editor/viewer does this & I was wondering if
there were any docs detailing it or indeed which class/jar/lib I should
be looking at.
<br>
<br>
TIA
<br>
<br>
Adam
<br>
</blockquote>
<br>
</body>
</html>
--------------090301080508090407030908--
|
|
| |
Re: Are there any docs for the XML Schema engine? [message #72856 is a reply to message #72842] |
Mon, 06 August 2007 11:13   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Adam,
If you read those articles, you'll see that EMF can do this (i.e.,
convert an XML Schema to Ecore and the process a .xml file according to
that Ecore) on the fly dynamically without generating any code thereby
providing a completely generic and dynamic engine. I'd imagine having
an API for the XForm itself might well be convenient. In any case, you
can use XSDSchema.resolveElement given a namespace and a name and from
the resulting XSDElementDeclaration you can get the type. If it's an
XSDComplexType, you can get the attribute uses and you can get the
content type, which might either be a simple type or a particle where
the particle will give you access to the nested elements and has a DFA
that can be used to recognize whether a sequence of namespace name pairs
represent valid content.
AdamF wrote:
> Ed Merks wrote:
>> Adam,
>>
>> Yes, you can use the XSD model for that. In fact, you might just
>> want to use EMF to convert the XML Schema to an Ecore model and
>> generate the APIs for that (or use EMF's dynamic capabilities. I
>> know a couple of folks have used this not only for the data models
>> that XForms will display, but also to generate the XForms model
>> itself. The following will be useful reading to understand how EMF
>> and XSD can be used to help implement your application.
>>
>> Tutorial: Generating an EMF Model using XML Schema
>>
>> < http://dev.eclipse.org/viewcvs/indextools.cgi/*checkout*/org .eclipse.emf/doc/org.eclipse.emf.doc/tutorials/xlibmod/xlibm od.html>
>>
>> Binding XML to Java
>>
>> < http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>
>> XML Schema to Ecore Mapping
>>
>> < http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
>>
>>
>> Unfortunately XML Schema is grossly complex and so the APIs for the
>> XSD model are similarly very complex, but they effectively implement
>> exactly the abstract component model defined in the XML Schema
>> specification, so the should certainly meet your needs in terms of
>> analyzing a schema in a high level abstract way...
>>
>
> Thanks. What I am looking for is a generic "any schema" engine which
> can simply say "the child elements of this element are...." &/or " the
> available attributes are" which I can then use to populate a drop down
> for the users.
>
> i.e. rather than compiling a specific ecore for a specific
> XForm/schema I'd like to stay as generic as possible.
>
> Adam
|
|
|
Re: Are there any docs for the XML Schema engine? [message #72948 is a reply to message #72792] |
Mon, 13 August 2007 16:54  |
Eclipse User |
|
|
|
Adam,
You may also want to query the Webtools newsgroup and study the source code
for the XML editor provided by that project. In particular, look for how
the content assist list is derived for the current element in the XML
editor.
Dave
"AdamF" <user@domain.invalid> wrote in message
news:f8srsp$dri$2@build.eclipse.org...
> Dear All,
>
> I am building a JSF/XForms engine & I am looking for an open source java
> library which can ingest a schema & then for a given element produce a
> list of what attributes & child elements can be added.
>
> The Eclipse schema editor/viewer does this & I was wondering if there were
> any docs detailing it or indeed which class/jar/lib I should be looking
> at.
>
> TIA
>
> Adam
|
|
|
Re: Are there any docs for the XML Schema engine? [message #602520 is a reply to message #72792] |
Thu, 02 August 2007 15:33  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------090301080508090407030908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Adam,
Yes, you can use the XSD model for that. In fact, you might just want
to use EMF to convert the XML Schema to an Ecore model and generate the
APIs for that (or use EMF's dynamic capabilities. I know a couple of
folks have used this not only for the data models that XForms will
display, but also to generate the XForms model itself. The following
will be useful reading to understand how EMF and XSD can be used to help
implement your application.
Tutorial: Generating an EMF Model using XML Schema
< http://dev.eclipse.org/viewcvs/indextools.cgi/*checkout*/org .eclipse.emf/doc/org.eclipse.emf.doc/tutorials/xlibmod/xlibm od.html>
Binding XML to Java
< http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>
XML Schema to Ecore Mapping
< http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
Unfortunately XML Schema is grossly complex and so the APIs for the XSD
model are similarly very complex, but they effectively implement exactly
the abstract component model defined in the XML Schema specification, so
the should certainly meet your needs in terms of analyzing a schema in a
high level abstract way...
AdamF wrote:
> Dear All,
>
> I am building a JSF/XForms engine & I am looking for an open source
> java library which can ingest a schema & then for a given element
> produce a list of what attributes & child elements can be added.
>
> The Eclipse schema editor/viewer does this & I was wondering if there
> were any docs detailing it or indeed which class/jar/lib I should be
> looking at.
>
> TIA
>
> Adam
--------------090301080508090407030908
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Adam,<br>
<br>
Yes, you can use the XSD model for that. In fact, you might just want
to use EMF to convert the XML Schema to an Ecore model and generate the
APIs for that (or use EMF's dynamic capabilities. I know a couple of
folks have used this not only for the data models that XForms will
display, but also to generate the XForms model itself. The following
will be useful reading to understand how EMF and XSD can be used to
help implement your application.<br>
<blockquote><a
href=" http://dev.eclipse.org/viewcvs/indextools.cgi/*checkout*/org .eclipse.emf/doc/org.eclipse.emf.doc/tutorials/xlibmod/xlibm od.html">Tutorial:
Generating an EMF Model using XML Schema</a><br>
<a target="_out"
href=" http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava">Binding
XML to Java</a><br>
<a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf">XML
Schema to Ecore Mapping</a><br>
</blockquote>
Unfortunately XML Schema is grossly complex and so the APIs for the XSD
model are similarly very complex, but they effectively implement
exactly the abstract component model defined in the XML Schema
specification, so the should certainly meet your needs in terms of
analyzing a schema in a high level abstract way...<br>
<br>
<br>
AdamF wrote:
<blockquote cite="mid:f8srsp$dri$2@build.eclipse.org" type="cite">Dear
All,
<br>
<br>
I am building a JSF/XForms engine & I am looking for an open source
java library which can ingest a schema & then for a given element
produce a list of what attributes & child elements can be added.
<br>
<br>
The Eclipse schema editor/viewer does this & I was wondering if
there were any docs detailing it or indeed which class/jar/lib I should
be looking at.
<br>
<br>
TIA
<br>
<br>
Adam
<br>
</blockquote>
<br>
</body>
</html>
--------------090301080508090407030908--
|
|
| |
Re: Are there any docs for the XML Schema engine? [message #602544 is a reply to message #72842] |
Mon, 06 August 2007 11:13  |
Eclipse User |
|
|
|
Adam,
If you read those articles, you'll see that EMF can do this (i.e.,
convert an XML Schema to Ecore and the process a .xml file according to
that Ecore) on the fly dynamically without generating any code thereby
providing a completely generic and dynamic engine. I'd imagine having
an API for the XForm itself might well be convenient. In any case, you
can use XSDSchema.resolveElement given a namespace and a name and from
the resulting XSDElementDeclaration you can get the type. If it's an
XSDComplexType, you can get the attribute uses and you can get the
content type, which might either be a simple type or a particle where
the particle will give you access to the nested elements and has a DFA
that can be used to recognize whether a sequence of namespace name pairs
represent valid content.
AdamF wrote:
> Ed Merks wrote:
>> Adam,
>>
>> Yes, you can use the XSD model for that. In fact, you might just
>> want to use EMF to convert the XML Schema to an Ecore model and
>> generate the APIs for that (or use EMF's dynamic capabilities. I
>> know a couple of folks have used this not only for the data models
>> that XForms will display, but also to generate the XForms model
>> itself. The following will be useful reading to understand how EMF
>> and XSD can be used to help implement your application.
>>
>> Tutorial: Generating an EMF Model using XML Schema
>>
>> < http://dev.eclipse.org/viewcvs/indextools.cgi/*checkout*/org .eclipse.emf/doc/org.eclipse.emf.doc/tutorials/xlibmod/xlibm od.html>
>>
>> Binding XML to Java
>>
>> < http://www.theserverside.com/tt/articles/article.tss?l=Bindi ngXMLJava>
>> XML Schema to Ecore Mapping
>>
>> < http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
>>
>>
>> Unfortunately XML Schema is grossly complex and so the APIs for the
>> XSD model are similarly very complex, but they effectively implement
>> exactly the abstract component model defined in the XML Schema
>> specification, so the should certainly meet your needs in terms of
>> analyzing a schema in a high level abstract way...
>>
>
> Thanks. What I am looking for is a generic "any schema" engine which
> can simply say "the child elements of this element are...." &/or " the
> available attributes are" which I can then use to populate a drop down
> for the users.
>
> i.e. rather than compiling a specific ecore for a specific
> XForm/schema I'd like to stay as generic as possible.
>
> Adam
|
|
|
Re: Are there any docs for the XML Schema engine? [message #602578 is a reply to message #72792] |
Mon, 13 August 2007 16:54  |
Eclipse User |
|
|
|
Adam,
You may also want to query the Webtools newsgroup and study the source code
for the XML editor provided by that project. In particular, look for how
the content assist list is derived for the current element in the XML
editor.
Dave
"AdamF" <user@domain.invalid> wrote in message
news:f8srsp$dri$2@build.eclipse.org...
> Dear All,
>
> I am building a JSF/XForms engine & I am looking for an open source java
> library which can ingest a schema & then for a given element produce a
> list of what attributes & child elements can be added.
>
> The Eclipse schema editor/viewer does this & I was wondering if there were
> any docs detailing it or indeed which class/jar/lib I should be looking
> at.
>
> TIA
>
> Adam
|
|
|
Goto Forum:
Current Time: Mon Feb 17 18:47:11 GMT 2025
Powered by FUDForum. Page generated in 0.04016 seconds
|