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?
···
--
Gavri
http://gavri.blogspot.com
Quoting Gavri Fernandez <gavri.fernandez@gmail.com>:
Hi,
Is there a xml schema api
(http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html\)
ruby library?
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.
···
Here are the docs for Apache's Java implementation:
XML Schema API
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?
--
Gavri
http://gavri.blogspot.com
--
R. Mark Volkmann
Partner, Object Computing, Inc.
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 Trang
"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?
···
On Sun, 13 Mar 2005 22:14:52 +0900, R. Mark Volkmann <mark@ociweb.com> wrote:
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.
--
Gavri
http://gavri.blogspot.com
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 Trang
"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
Gavri
E
···
On 3/13/2005, "Gavri Fernandez" <gavri.fernandez@gmail.com> wrote:
On Sun, 13 Mar 2005 22:14:52 +0900, R. Mark Volkmann <mark@ociweb.com> wrote:
ES <ruby-ml@magical-cat.org> writes:
You're right. However, all is not lost: see
RELAX NG home page
I've gotten good conversion from Sun's RELAX NG Converter listed in
that page. 'Good' meaning emacs' nxml-mode (made by the creator of
RelaxNG, James Clark) accepts the outputted relaxng schema.
YS.