[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

xml schema api

Gavri Fernandez

3/13/2005 1:05:00 PM

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

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

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.bl...


4 Answers

R. Mark Volkmann

3/13/2005 1:15:00 PM

0

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-schem...)
> 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:
> http://xml.apache.org/xerces2-j/javadocs/xs/...
>
> 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.bl...
>
>


--
R. Mark Volkmann
Partner, Object Computing, Inc.


Gavri Fernandez

3/13/2005 2:03:00 PM

0

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.

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/...
"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?

--
Gavri
http://gavri.bl...


ES

3/13/2005 2:13:00 PM

0




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:
>
>> 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/...
>"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/#...

>Gavri

E


Yohanes Santoso

3/16/2005 5:09:00 PM

0

ES <ruby-ml@magical-cat.org> writes:

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

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.