xml schema api

G

Gavri Fernandez

Hi,
Is there a xml schema api
(http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html)
ruby library?

Here are the docs for Apache's Java implementation:
http://xml.apache.org/xerces2-j/javadocs/xs/index.html

My intention is create a generator that produces code based on an xml
schema. This output code, of course, is used to manipulate and more
importantly _represent_ instances of the schema. (i'm creating a
rest-client generator)

If there is no xml-schema api lib available for ruby, what is the best
alternative way of doing what I want?

Or is all of this wrong and there is an easier approach?
 
R

R. Mark Volkmann

Quoting Gavri Fernandez said:

I'm not aware of one. If you end up having to implement this yourself, you may
find it easier to use RELAX NG instead of XML Schema. If you need to operate
on existing XML Schemas, there is a tool called Trang that can convert XML
Schema syntax to RELAX NG syntax. Actually, Trang performs many similar
conversions.
 
G

Gavri Fernandez

find it easier to use RELAX NG instead of XML Schema. If you need to operate
on existing XML Schemas, there is a tool called Trang that can convert XML
Schema syntax to RELAX NG syntax. Actually, Trang performs many similar
conversions.

Thanks for your comments.
I do need to operate on existing schemas and it seems TRANG cannot
convert from XML schema to RELAX NG.

From http://www.thaiopensource.com/relaxng/trang.html
"A schema written in any of the supported schema languages can be
converted into any of the other supported schema languages, except
that W3C XML Schema is supported for output only, not for input."

Or am I misunderstanding this statement?
 
E

ES

Thanks for your comments.
I do need to operate on existing schemas and it seems TRANG cannot
convert from XML schema to RELAX NG.

From http://www.thaiopensource.com/relaxng/trang.html
"A schema written in any of the supported schema languages can be
converted into any of the other supported schema languages, except
that W3C XML Schema is supported for output only, not for input."

Or am I misunderstanding this statement?

You're right. However, all is not lost: see
http://www.relaxng.org/#conversion

E
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top