You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by sv...@mail.bg on 2004/07/19 11:14:30 UTC

JAXME->DOM


Hi all,

Is there way to export XSSchema into DOM?

Thanks in advance!


-----------------------------

Участвайте в играта на Ин Тайм “Винаги навреме!”
Спечелете швейцарски часовник DOXA!
http://www.intime.bg

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JAXME->DOM

Posted by robert burrell donkin <rd...@apache.org>.
On 19 Jul 2004, at 15:04, Jochen Wiedmann wrote:

> sv_jaxme@mail.bg wrote:
>
>> My situation is that I have schema possibly conatining
>> imports. It is desired that imports are not resolved at
>> runtime. So I have to make a tool to resolve imports,
>> download & check them, change all import declatarion to
>> local file links, save modified schema. It seems that I'll
>> have to implement my own save.
>
> And that's exactly, what an EntityResolver is made for. You set the 
> parsers EntityResolver and the parser will invoke it whenever external 
> files are referenced.

+1

i believe that norman has some catalog code over in xml commons 
(http://xml.apache.org/commons/components/resolver/index.html) which 
may save you some effort. i see that he has also linked to an article 
of his (from there) so that'd probably be an good way to get up to 
speed with entity resolvers and catalogs.

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JAXME->DOM

Posted by Jochen Wiedmann <jo...@freenet.de>.
sv_jaxme@mail.bg wrote:

>>
>And how would I change original schema file? I understand
>that loading is not a problem. But I have a requirenment to
>change import declarations in original or new schema file.
>I'll try with content handler. Thus I'll be able to build
>new document with changed imports.
>
The idea is, you don't change the original schema file. You simply 
provide a mapping between file names as specified in the schema file and 
file names being actually loaded.


Jochen




---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JAXME->DOM

Posted by Jochen Wiedmann <jo...@freenet.de>.
sv_jaxme@mail.bg wrote:

> My situation is that I have schema possibly conatining
> imports. It is desired that imports are not resolved at
> runtime. So I have to make a tool to resolve imports,
> download & check them, change all import declatarion to
> local file links, save modified schema. It seems that I'll
> have to implement my own save.

And that's exactly, what an EntityResolver is made for. You set the parsers 
EntityResolver and the parser will invoke it whenever external files are 
referenced.


Jochen

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JAXME->DOM

Posted by sv...@mail.bg.
My situation is that I have schema possibly conatining
imports. It is desired that imports are not resolved at
runtime. So I have to make a tool to resolve imports,
download & check them, change all import declatarion to
local file links, save modified schema. It seems that I'll
have to implement my own save.

> sv_jaxme@mail.bg wrote:
>
> > And how should I write modified schema?
> > I really don't need exactly DOM, but I do need
> something to
> > write modified schema.
>
> JaxMeXS does not support writing a schema: You're the
> first one looking for
> such a feature.
>
> However, is it possible that you are actually looking for
> an EntityResolver?
> In other words, that you want to change URL's while
> parsing a complex XML
> document?
>
>
> Jochen
>






--------------------------------------
Това писмо е изпратено от  www.mail.bg

Безплатният адрес в mail.bg предлага:
- Силна АнтиСПАМ защита
- 12MB място за поща
- SMS за ново писмо (всички оператори)
- WAP достъп от GSM и без компютър
- Безплатен POP3 достъп
- Безплатна поддръжка по телефона
______________________________________
БЕЗ ИЗЛИШНИ ВЪПРОСИ РЕГИСТРИРАЙТЕ СВОЙ
БЕЗПЛАТЕН АДРЕС НА  http://www.mail.bg



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JAXME->DOM

Posted by Jochen Wiedmann <jo...@freenet.de>.
sv_jaxme@mail.bg wrote:

> And how should I write modified schema?
> I really don't need exactly DOM, but I do need something to
> write modified schema.

JaxMeXS does not support writing a schema: You're the first one looking for 
such a feature.

However, is it possible that you are actually looking for an EntityResolver? 
In other words, that you want to change URL's while parsing a complex XML 
document?


Jochen

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JAXME->DOM

Posted by sv...@mail.bg.
And how should I write modified schema?
I really don't need exactly DOM, but I do need something to
write modified schema.

> sv_jaxme@mail.bg wrote:
>
> > I have to find imports in schema, evetually download
> them -
> > of course this leads to change in improt declaration.
> Very
> > simple, but if there is something ready for this task.
>
> You don't need DOM for that. Use JaxMeXS's syntax parser
> (see
>
>
>
http://ws.apache.org/jaxme/xs/syntax.html#Using+the+syntax+parser
>
> for a description). The returned instance of XsESchema
> has a method
>
>      Object[] getChilds();
>
> Walk through the array and check, whether the objects are
> instances of
> XsEInclude, or XsEImport, respectively.
>
>
> Jochen
>






--------------------------------------
Това писмо е изпратено от  www.mail.bg

Безплатният адрес в mail.bg предлага:
- Силна АнтиСПАМ защита
- 12MB място за поща
- SMS за ново писмо (всички оператори)
- WAP достъп от GSM и без компютър
- Безплатен POP3 достъп
- Безплатна поддръжка по телефона
______________________________________
БЕЗ ИЗЛИШНИ ВЪПРОСИ РЕГИСТРИРАЙТЕ СВОЙ
БЕЗПЛАТЕН АДРЕС НА  http://www.mail.bg



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JAXME->DOM

Posted by Jochen Wiedmann <jo...@freenet.de>.
sv_jaxme@mail.bg wrote:

> I have to find imports in schema, evetually download them -
> of course this leads to change in improt declaration. Very
> simple, but if there is something ready for this task.

You don't need DOM for that. Use JaxMeXS's syntax parser (see

   http://ws.apache.org/jaxme/xs/syntax.html#Using+the+syntax+parser

for a description). The returned instance of XsESchema has a method

     Object[] getChilds();

Walk through the array and check, whether the objects are instances of 
XsEInclude, or XsEImport, respectively.


Jochen

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JAXME->DOM

Posted by Jochen Wiedmann <jo...@freenet.de>.
sv_jaxme@mail.bg wrote:

> What I want is to use JaxMeXS to edit schemas (import is ok
> - with XSParser). If possible of course. I don't need to
> have anything with jaxb objects.

And how is JaxMeXS related to XML Schema in your picture?

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: JAXME->DOM

Posted by Jochen Wiedmann <jo...@freenet.de>.
sv_jaxme@mail.bg wrote:

> Is there way to export XSSchema into DOM?

Don't understand what you would like to see. If your question is "How to I 
convert a JaxMe object into a DOM tree", then the answer is

http://ws.apache.org/jaxme/apidocs/javax/xml/bind/Marshaller.html#marshal(java.lang.Object,%20javax.xml.transform.Result)

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org