Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Access to XML header properties: How?
Access to XML header properties: How? [message #17154] Tue, 08 April 2003 07:23 Go to next message
Eclipse UserFriend
Originally posted by: dirk.schesmer.divos.de

Hi all,

being from Europe, I'd like to specify the following XML header using
ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
encoding="ISO-8859-1"?>

Can someone please show me the corresponding Java statements?

Thanks for help,
Dirk V. Schesmer
Re: Access to XML header properties: How? [message #17184 is a reply to message #17154] Tue, 08 April 2003 23:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Dirk,

Being from the center of the universe, I did not consider how to do
this. (Actually I was born in Europe, and Canada is hardly the center of
the universe. ;-) Clearly this capability needs to be supported, so I
will consider how best to do that and get back to you with a solution as
soon as possible. I'll probably provide support for access to
XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
option. The default save option will be set if and when the .xsd is
loaded and can then be overriden directly or by passing an option in
during save...

"Dirk V. Schesmer" wrote:

> Hi all,
>
> being from Europe, I'd like to specify the following XML header using
> ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> encoding="ISO-8859-1"?>
>
> Can someone please show me the corresponding Java statements?
>
> Thanks for help,
> Dirk V. Schesmer
Re: Access to XML header properties: How? [message #17210 is a reply to message #17184] Wed, 09 April 2003 17:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

--------------480F7E616724870EFDB49D62
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dirk,

I was hoping to be able to detect the encoding when reading a document but
this Xerces FAQ answer for how to do that

http://xml.apache.org/xerces2-j/faq-general.html#faq-5

doesn't work for the version of Xerces being used in Eclipse. :-(

When we switch to a version where it works, the resource will determine the
encoding during load and will use it during save. Until that time, you will
need to manually specify the encoding used during save. There will be two
ways to do this. Either do it as an override during each save:

Map map = new HashMap();
map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
xsdSchema.eResource().save(out, map);

or set it as the default so that it happens for every subsequent save:

// This only needs to be done once
((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDResourceImpl.XSD_ENCODING,
"ISO-8859-1");
xsdSchema.eResource().save(out, null);

If the XML parser we use could detect the encoding, then the option would be
set during load...

I'm hoping to get a 1.1.0 driver out this week, but it may not be until next
week...


Ed Merks wrote:

> Dirk,
>
> Being from the center of the universe, I did not consider how to do
> this. (Actually I was born in Europe, and Canada is hardly the center of
> the universe. ;-) Clearly this capability needs to be supported, so I
> will consider how best to do that and get back to you with a solution as
> soon as possible. I'll probably provide support for access to
> XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
> option. The default save option will be set if and when the .xsd is
> loaded and can then be overriden directly or by passing an option in
> during save...
>
> "Dirk V. Schesmer" wrote:
>
> > Hi all,
> >
> > being from Europe, I'd like to specify the following XML header using
> > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> > encoding="ISO-8859-1"?>
> >
> > Can someone please show me the corresponding Java statements?
> >
> > Thanks for help,
> > Dirk V. Schesmer

--------------480F7E616724870EFDB49D62
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Dirk,
<p>I was hoping to be able to detect the encoding when reading a document
but this Xerces FAQ answer for how to do that
<blockquote><a href="http://xml.apache.org/xerces2-j/faq-general.html#faq-5">http://xml.apache.org/xerces2-j/faq-general.html#faq-5</a></blockquote>
doesn't work for the version of Xerces being used in Eclipse.&nbsp;&nbsp;
:-(
<p>When we switch to a version where it works, the resource will determine
the encoding during load and will use it during save.&nbsp; Until that
time, you will need to manually specify the encoding used during save.&nbsp;
There will be two ways to do this.&nbsp; Either do it as an override during
each save:
<blockquote>Map map = new HashMap();
<br>map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
<br>xsdSchema.eResource().save(out, map);</blockquote>
or set it as the default so that it happens for every subsequent save:
<blockquote>// This only needs to be done once
<br> ((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDResourceImpl.XSD_ENCODING,
"ISO-8859-1");
<br>xsdSchema.eResource().save(out, null);</blockquote>
If the XML parser we use could detect the encoding, then the option would
be set during load...
<p>I'm hoping to get a 1.1.0 driver out this week, but it may not be until
next week...
<br>&nbsp;
<p>Ed Merks wrote:
<blockquote TYPE=CITE>Dirk,
<p>Being from the center of the universe, I did not consider how to do
<br>this.&nbsp; (Actually I was born in Europe, and Canada is hardly the
center of
<br>the universe. ;-)&nbsp; Clearly this capability needs to be supported,
so I
<br>will consider how best to do that and get back to you with a solution
as
<br>soon as possible.&nbsp; I'll probably provide support for access to
<br>XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
<br>option.&nbsp; The default save option will be set if and when the .xsd
is
<br>loaded and can then be overriden directly or by passing an option in
<br>during save...
<p>"Dirk V. Schesmer" wrote:
<p>> Hi all,
<br>>
<br>> being from Europe, I'd like to specify the following XML header using
<br>> ISO-8859-1 encoding for my XML schemas: &lt;?xml version="1.0"
<br>> encoding="ISO-8859-1"?>
<br>>
<br>> Can someone please show&nbsp; me the corresponding Java statements?
<br>>
<br>> Thanks for help,
<br>> Dirk V. Schesmer</blockquote>
</html>

--------------480F7E616724870EFDB49D62--
Re: Access to XML header properties: How? [message #17238 is a reply to message #17210] Wed, 09 April 2003 20:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

--------------B9FE08DD863A262E6F64F0F1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dirk,

With the help of Sandy Gao from the Xerces team I was able to hack out a
solution. It's not pretty, but it works. So the resource will be able
to auto detect the encoding during load and will use it during save.
Naturally when you create a new resource/schema from scratch, you'll
need to set it as outlined below...


Ed Merks wrote:

> Dirk,
>
> I was hoping to be able to detect the encoding when reading a document
> but this Xerces FAQ answer for how to do that
>
> http://xml.apache.org/xerces2-j/faq-general.html#faq-5
>
> doesn't work for the version of Xerces being used in Eclipse. :-(
>
> When we switch to a version where it works, the resource will
> determine the encoding during load and will use it during save. Until
> that time, you will need to manually specify the encoding used during
> save. There will be two ways to do this. Either do it as an override
> during each save:
>
> Map map = new HashMap();
> map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
> xsdSchema.eResource().save(out, map);
>
> or set it as the default so that it happens for every subsequent save:
>
> // This only needs to be done once
> ((XSDResourceImpl)xsdSchema.eResou
> ce()).getDefaultSaveOptions().put(XSDResourceImpl.XSD_ENCODI NG,
> "ISO-8859-1");
> xsdSchema.eResource().save(out, null);
>
> If the XML parser we use could detect the encoding, then the option
> would be set during load...
>
> I'm hoping to get a 1.1.0 driver out this week, but it may not be
> until next week...
>
>
> Ed Merks wrote:
>
>> Dirk,
>>
>> Being from the center of the universe, I did not consider how to do
>> this. (Actually I was born in Europe, and Canada is hardly the
>> center of
>> the universe. ;-) Clearly this capability needs to be supported, so
>> I
>> will consider how best to do that and get back to you with a
>> solution as
>> soon as possible. I'll probably provide support for access to
>> XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
>> option. The default save option will be set if and when the .xsd is
>>
>> loaded and can then be overriden directly or by passing an option in
>>
>> during save...
>>
>> "Dirk V. Schesmer" wrote:
>>
>> > Hi all,
>> >
>> > being from Europe, I'd like to specify the following XML header
>> using
>> > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
>> > encoding="ISO-8859-1"?>
>> >
>> > Can someone please show me the corresponding Java statements?
>> >
>> > Thanks for help,
>> > Dirk V. Schesmer
>

--------------B9FE08DD863A262E6F64F0F1
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Dirk,
<p>With the help of Sandy Gao from the Xerces team I was able to hack out
a solution.&nbsp; It's not pretty, but it works.&nbsp; So the resource
will be able to auto detect the encoding during load and will use it during
save.&nbsp; Naturally when you create a new resource/schema from scratch,
you'll need to set it as outlined below...
<br>&nbsp;
<p>Ed Merks wrote:
<blockquote TYPE=CITE>Dirk,
<p>I was hoping to be able to detect the encoding when reading a document
but this Xerces FAQ answer for how to do that
<blockquote><a href="http://xml.apache.org/xerces2-j/faq-general.html#faq-5">http://xml.apache.org/xerces2-j/faq-general.html#faq-5</a></blockquote>
doesn't work for the version of Xerces being used in Eclipse.&nbsp;&nbsp;
:-(
<p>When we switch to a version where it works, the resource will determine
the encoding during load and will use it during save.&nbsp; Until that
time, you will need to manually specify the encoding used during save.&nbsp;
There will be two ways to do this.&nbsp; Either do it as an override during
each save:
<blockquote>Map map = new HashMap();
<br>map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
<br>xsdSchema.eResource().save(out, map);</blockquote>
or set it as the default so that it happens for every subsequent save:
<blockquote>// This only needs to be done once
<br> ((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDResourceImpl.XSD_ENCODING,
"ISO-8859-1");
<br>xsdSchema.eResource().save(out, null);</blockquote>
If the XML parser we use could detect the encoding, then the option would
be set during load...
<p>I'm hoping to get a 1.1.0 driver out this week, but it may not be until
next week...
<br>&nbsp;
<p>Ed Merks wrote:
<blockquote TYPE=CITE>Dirk,
<p>Being from the center of the universe, I did not consider how to do
<br>this.&nbsp; (Actually I was born in Europe, and Canada is hardly the
center of
<br>the universe. ;-)&nbsp; Clearly this capability needs to be supported,
so I
<br>will consider how best to do that and get back to you with a solution
as
<br>soon as possible.&nbsp; I'll probably provide support for access to
<br>XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
<br>option.&nbsp; The default save option will be set if and when the .xsd
is
<br>loaded and can then be overriden directly or by passing an option in
<br>during save...
<p>"Dirk V. Schesmer" wrote:
<p>> Hi all,
<br>>
<br>> being from Europe, I'd like to specify the following XML header using
<br>> ISO-8859-1 encoding for my XML schemas: &lt;?xml version="1.0"
<br>> encoding="ISO-8859-1"?>
<br>>
<br>> Can someone please show&nbsp; me the corresponding Java statements?
<br>>
<br>> Thanks for help,
<br>> Dirk V. Schesmer</blockquote>
</blockquote>
</html>

--------------B9FE08DD863A262E6F64F0F1--
Re: Access to XML header properties: How? [message #18929 is a reply to message #17238] Thu, 01 May 2003 06:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paechoi.earthlink.net

I see the v1.1 in the CVS, but not on the release web page. The latest is
shown as:

March 26th - Release Version 1.0.2 build (20030326_0335VL) is available for
download

When would be the date we can expect the official release of 1.1 that
support
the XSDResourceImpl.XSD_ENCODING?


Pae



"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3E947E3D.CF030F24@ca.ibm.com...
Dirk,
With the help of Sandy Gao from the Xerces team I was able to hack out a
solution. It's not pretty, but it works. So the resource will be able to
auto detect the encoding during load and will use it during save. Naturally
when you create a new resource/schema from scratch, you'll need to set it as
outlined below...

Ed Merks wrote:
Dirk,
I was hoping to be able to detect the encoding when reading a document but
this Xerces FAQ answer for how to do that
http://xml.apache.org/xerces2-j/faq-general.html#faq-5
doesn't work for the version of Xerces being used in Eclipse. :-(
When we switch to a version where it works, the resource will determine the
encoding during load and will use it during save. Until that time, you will
need to manually specify the encoding used during save. There will be two
ways to do this. Either do it as an override during each save:
Map map = new HashMap();
map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
xsdSchema.eResource().save(out, map);
or set it as the default so that it happens for every subsequent save:
// This only needs to be done once
((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDReso
urceImpl.XSD_ENCODING, "ISO-8859-1");
xsdSchema.eResource().save(out, null);
If the XML parser we use could detect the encoding, then the option would be
set during load...
I'm hoping to get a 1.1.0 driver out this week, but it may not be until next
week...

Ed Merks wrote:
Dirk,
Being from the center of the universe, I did not consider how to do
this. (Actually I was born in Europe, and Canada is hardly the center of
the universe. ;-) Clearly this capability needs to be supported, so I
will consider how best to do that and get back to you with a solution as
soon as possible. I'll probably provide support for access to
XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
option. The default save option will be set if and when the .xsd is
loaded and can then be overriden directly or by passing an option in
during save...
"Dirk V. Schesmer" wrote:
> Hi all,
>
> being from Europe, I'd like to specify the following XML header using
> ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> encoding="ISO-8859-1"?>
>
> Can someone please show me the corresponding Java statements?
>
> Thanks for help,
> Dirk V. Schesmer
Re: Access to XML header properties: How? [message #18951 is a reply to message #18929] Thu, 01 May 2003 09:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Pae,

If all goes well, the plan is to make it available today (and to populate CVS
with all the source code).


Pae Choi wrote:

> I see the v1.1 in the CVS, but not on the release web page. The latest is
> shown as:
>
> March 26th - Release Version 1.0.2 build (20030326_0335VL) is available for
> download
>
> When would be the date we can expect the official release of 1.1 that
> support
> the XSDResourceImpl.XSD_ENCODING?
>
> Pae
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3E947E3D.CF030F24@ca.ibm.com...
> Dirk,
> With the help of Sandy Gao from the Xerces team I was able to hack out a
> solution. It's not pretty, but it works. So the resource will be able to
> auto detect the encoding during load and will use it during save. Naturally
> when you create a new resource/schema from scratch, you'll need to set it as
> outlined below...
>
> Ed Merks wrote:
> Dirk,
> I was hoping to be able to detect the encoding when reading a document but
> this Xerces FAQ answer for how to do that
> http://xml.apache.org/xerces2-j/faq-general.html#faq-5
> doesn't work for the version of Xerces being used in Eclipse. :-(
> When we switch to a version where it works, the resource will determine the
> encoding during load and will use it during save. Until that time, you will
> need to manually specify the encoding used during save. There will be two
> ways to do this. Either do it as an override during each save:
> Map map = new HashMap();
> map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
> xsdSchema.eResource().save(out, map);
> or set it as the default so that it happens for every subsequent save:
> // This only needs to be done once
> ((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDReso
> urceImpl.XSD_ENCODING, "ISO-8859-1");
> xsdSchema.eResource().save(out, null);
> If the XML parser we use could detect the encoding, then the option would be
> set during load...
> I'm hoping to get a 1.1.0 driver out this week, but it may not be until next
> week...
>
> Ed Merks wrote:
> Dirk,
> Being from the center of the universe, I did not consider how to do
> this. (Actually I was born in Europe, and Canada is hardly the center of
> the universe. ;-) Clearly this capability needs to be supported, so I
> will consider how best to do that and get back to you with a solution as
> soon as possible. I'll probably provide support for access to
> XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
> option. The default save option will be set if and when the .xsd is
> loaded and can then be overriden directly or by passing an option in
> during save...
> "Dirk V. Schesmer" wrote:
> > Hi all,
> >
> > being from Europe, I'd like to specify the following XML header using
> > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> > encoding="ISO-8859-1"?>
> >
> > Can someone please show me the corresponding Java statements?
> >
> > Thanks for help,
> > Dirk V. Schesmer
Re: Access to XML header properties: How? [message #19465 is a reply to message #18951] Fri, 02 May 2003 10:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: paechoi.earthlink.net

Ed,

Thanks for sharing your plan as well as your prompt reply. I just
check [1]the web site and I am seeing it.

While I was reading the "1. New Plugins" section, I just had a
question for the statement as follows:

"The xsd2ecore plugins (org.eclipse.emf.mapping.xsd2ecore and
org.eclipse.emf.mapping.xsd2ecore.editor) have been added"

Would you clarify whether we need to get a specific version of
EMF package or those new plugins are added in the XSD package?
Thank you.

Regards,


Pae


[1] http://www.eclipse.org/xsd/


"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3EB0EC2F.A43ED204@ca.ibm.com...
> Pae,
>
> If all goes well, the plan is to make it available today (and to populate
CVS
> with all the source code).
>
>
> Pae Choi wrote:
>
> > I see the v1.1 in the CVS, but not on the release web page. The latest
is
> > shown as:
> >
> > March 26th - Release Version 1.0.2 build (20030326_0335VL) is available
for
> > download
> >
> > When would be the date we can expect the official release of 1.1 that
> > support
> > the XSDResourceImpl.XSD_ENCODING?
> >
> > Pae
> >
> > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > news:3E947E3D.CF030F24@ca.ibm.com...
> > Dirk,
> > With the help of Sandy Gao from the Xerces team I was able to hack out a
> > solution. It's not pretty, but it works. So the resource will be able
to
> > auto detect the encoding during load and will use it during save.
Naturally
> > when you create a new resource/schema from scratch, you'll need to set
it as
> > outlined below...
> >
> > Ed Merks wrote:
> > Dirk,
> > I was hoping to be able to detect the encoding when reading a document
but
> > this Xerces FAQ answer for how to do that
> > http://xml.apache.org/xerces2-j/faq-general.html#faq-5
> > doesn't work for the version of Xerces being used in Eclipse. :-(
> > When we switch to a version where it works, the resource will determine
the
> > encoding during load and will use it during save. Until that time, you
will
> > need to manually specify the encoding used during save. There will be
two
> > ways to do this. Either do it as an override during each save:
> > Map map = new HashMap();
> > map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
> > xsdSchema.eResource().save(out, map);
> > or set it as the default so that it happens for every subsequent save:
> > // This only needs to be done once
> >
((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDReso
> > urceImpl.XSD_ENCODING, "ISO-8859-1");
> > xsdSchema.eResource().save(out, null);
> > If the XML parser we use could detect the encoding, then the option
would be
> > set during load...
> > I'm hoping to get a 1.1.0 driver out this week, but it may not be until
next
> > week...
> >
> > Ed Merks wrote:
> > Dirk,
> > Being from the center of the universe, I did not consider how to do
> > this. (Actually I was born in Europe, and Canada is hardly the center
of
> > the universe. ;-) Clearly this capability needs to be supported, so I
> > will consider how best to do that and get back to you with a solution as
> > soon as possible. I'll probably provide support for access to
> > XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
> > option. The default save option will be set if and when the .xsd is
> > loaded and can then be overriden directly or by passing an option in
> > during save...
> > "Dirk V. Schesmer" wrote:
> > > Hi all,
> > >
> > > being from Europe, I'd like to specify the following XML header using
> > > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> > > encoding="ISO-8859-1"?>
> > >
> > > Can someone please show me the corresponding Java statements?
> > >
> > > Thanks for help,
> > > Dirk V. Schesmer
>
Re: Access to XML header properties: How? [message #19509 is a reply to message #19465] Fri, 02 May 2003 10:49 Go to previous message
Eclipse UserFriend
Originally posted by: paechoi.earthlink.net

I found it. Please discard the inquiry related to those new plugins.

Regards,


Pae


"Pae Choi" <paechoi@earthlink.net> wrote in message
news:b8thc0$g8k$1@rogue.oti.com...
> Ed,
>
> Thanks for sharing your plan as well as your prompt reply. I just
> check [1]the web site and I am seeing it.
>
> While I was reading the "1. New Plugins" section, I just had a
> question for the statement as follows:
>
> "The xsd2ecore plugins (org.eclipse.emf.mapping.xsd2ecore and
> org.eclipse.emf.mapping.xsd2ecore.editor) have been added"
>
> Would you clarify whether we need to get a specific version of
> EMF package or those new plugins are added in the XSD package?
> Thank you.
>
> Regards,
>
>
> Pae
>
>
> [1] http://www.eclipse.org/xsd/
>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3EB0EC2F.A43ED204@ca.ibm.com...
> > Pae,
> >
> > If all goes well, the plan is to make it available today (and to
populate
> CVS
> > with all the source code).
> >
> >
> > Pae Choi wrote:
> >
> > > I see the v1.1 in the CVS, but not on the release web page. The latest
> is
> > > shown as:
> > >
> > > March 26th - Release Version 1.0.2 build (20030326_0335VL) is
available
> for
> > > download
> > >
> > > When would be the date we can expect the official release of 1.1 that
> > > support
> > > the XSDResourceImpl.XSD_ENCODING?
> > >
> > > Pae
> > >
> > > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > > news:3E947E3D.CF030F24@ca.ibm.com...
> > > Dirk,
> > > With the help of Sandy Gao from the Xerces team I was able to hack out
a
> > > solution. It's not pretty, but it works. So the resource will be
able
> to
> > > auto detect the encoding during load and will use it during save.
> Naturally
> > > when you create a new resource/schema from scratch, you'll need to set
> it as
> > > outlined below...
> > >
> > > Ed Merks wrote:
> > > Dirk,
> > > I was hoping to be able to detect the encoding when reading a document
> but
> > > this Xerces FAQ answer for how to do that
> > > http://xml.apache.org/xerces2-j/faq-general.html#faq-5
> > > doesn't work for the version of Xerces being used in Eclipse. :-(
> > > When we switch to a version where it works, the resource will
determine
> the
> > > encoding during load and will use it during save. Until that time,
you
> will
> > > need to manually specify the encoding used during save. There will be
> two
> > > ways to do this. Either do it as an override during each save:
> > > Map map = new HashMap();
> > > map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
> > > xsdSchema.eResource().save(out, map);
> > > or set it as the default so that it happens for every subsequent save:
> > > // This only needs to be done once
> > >
>
((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDReso
> > > urceImpl.XSD_ENCODING, "ISO-8859-1");
> > > xsdSchema.eResource().save(out, null);
> > > If the XML parser we use could detect the encoding, then the option
> would be
> > > set during load...
> > > I'm hoping to get a 1.1.0 driver out this week, but it may not be
until
> next
> > > week...
> > >
> > > Ed Merks wrote:
> > > Dirk,
> > > Being from the center of the universe, I did not consider how to do
> > > this. (Actually I was born in Europe, and Canada is hardly the center
> of
> > > the universe. ;-) Clearly this capability needs to be supported, so I
> > > will consider how best to do that and get back to you with a solution
as
> > > soon as possible. I'll probably provide support for access to
> > > XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
> > > option. The default save option will be set if and when the .xsd is
> > > loaded and can then be overriden directly or by passing an option in
> > > during save...
> > > "Dirk V. Schesmer" wrote:
> > > > Hi all,
> > > >
> > > > being from Europe, I'd like to specify the following XML header
using
> > > > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> > > > encoding="ISO-8859-1"?>
> > > >
> > > > Can someone please show me the corresponding Java statements?
> > > >
> > > > Thanks for help,
> > > > Dirk V. Schesmer
> >
>
>
Re: Access to XML header properties: How? [message #567366 is a reply to message #17154] Tue, 08 April 2003 23:01 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Dirk,

Being from the center of the universe, I did not consider how to do
this. (Actually I was born in Europe, and Canada is hardly the center of
the universe. ;-) Clearly this capability needs to be supported, so I
will consider how best to do that and get back to you with a solution as
soon as possible. I'll probably provide support for access to
XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
option. The default save option will be set if and when the .xsd is
loaded and can then be overriden directly or by passing an option in
during save...

"Dirk V. Schesmer" wrote:

> Hi all,
>
> being from Europe, I'd like to specify the following XML header using
> ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> encoding="ISO-8859-1"?>
>
> Can someone please show me the corresponding Java statements?
>
> Thanks for help,
> Dirk V. Schesmer


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Access to XML header properties: How? [message #567390 is a reply to message #17184] Wed, 09 April 2003 17:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
--------------480F7E616724870EFDB49D62
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dirk,

I was hoping to be able to detect the encoding when reading a document but
this Xerces FAQ answer for how to do that

http://xml.apache.org/xerces2-j/faq-general.html#faq-5

doesn't work for the version of Xerces being used in Eclipse. :-(

When we switch to a version where it works, the resource will determine the
encoding during load and will use it during save. Until that time, you will
need to manually specify the encoding used during save. There will be two
ways to do this. Either do it as an override during each save:

Map map = new HashMap();
map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
xsdSchema.eResource().save(out, map);

or set it as the default so that it happens for every subsequent save:

// This only needs to be done once
((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDResourceImpl.XSD_ENCODING,
"ISO-8859-1");
xsdSchema.eResource().save(out, null);

If the XML parser we use could detect the encoding, then the option would be
set during load...

I'm hoping to get a 1.1.0 driver out this week, but it may not be until next
week...


Ed Merks wrote:

> Dirk,
>
> Being from the center of the universe, I did not consider how to do
> this. (Actually I was born in Europe, and Canada is hardly the center of
> the universe. ;-) Clearly this capability needs to be supported, so I
> will consider how best to do that and get back to you with a solution as
> soon as possible. I'll probably provide support for access to
> XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
> option. The default save option will be set if and when the .xsd is
> loaded and can then be overriden directly or by passing an option in
> during save...
>
> "Dirk V. Schesmer" wrote:
>
> > Hi all,
> >
> > being from Europe, I'd like to specify the following XML header using
> > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> > encoding="ISO-8859-1"?>
> >
> > Can someone please show me the corresponding Java statements?
> >
> > Thanks for help,
> > Dirk V. Schesmer

--------------480F7E616724870EFDB49D62
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Dirk,
<p>I was hoping to be able to detect the encoding when reading a document
but this Xerces FAQ answer for how to do that
<blockquote><a href="http://xml.apache.org/xerces2-j/faq-general.html#faq-5">http://xml.apache.org/xerces2-j/faq-general.html#faq-5</a></blockquote>
doesn't work for the version of Xerces being used in Eclipse.&nbsp;&nbsp;
:-(
<p>When we switch to a version where it works, the resource will determine
the encoding during load and will use it during save.&nbsp; Until that
time, you will need to manually specify the encoding used during save.&nbsp;
There will be two ways to do this.&nbsp; Either do it as an override during
each save:
<blockquote>Map map = new HashMap();
<br>map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
<br>xsdSchema.eResource().save(out, map);</blockquote>
or set it as the default so that it happens for every subsequent save:
<blockquote>// This only needs to be done once
<br> ((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDResourceImpl.XSD_ENCODING,
"ISO-8859-1");
<br>xsdSchema.eResource().save(out, null);</blockquote>
If the XML parser we use could detect the encoding, then the option would
be set during load...
<p>I'm hoping to get a 1.1.0 driver out this week, but it may not be until
next week...
<br>&nbsp;
<p>Ed Merks wrote:
<blockquote TYPE=CITE>Dirk,
<p>Being from the center of the universe, I did not consider how to do
<br>this.&nbsp; (Actually I was born in Europe, and Canada is hardly the
center of
<br>the universe. ;-)&nbsp; Clearly this capability needs to be supported,
so I
<br>will consider how best to do that and get back to you with a solution
as
<br>soon as possible.&nbsp; I'll probably provide support for access to
<br>XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
<br>option.&nbsp; The default save option will be set if and when the .xsd
is
<br>loaded and can then be overriden directly or by passing an option in
<br>during save...
<p>"Dirk V. Schesmer" wrote:
<p>> Hi all,
<br>>
<br>> being from Europe, I'd like to specify the following XML header using
<br>> ISO-8859-1 encoding for my XML schemas: &lt;?xml version="1.0"
<br>> encoding="ISO-8859-1"?>
<br>>
<br>> Can someone please show&nbsp; me the corresponding Java statements?
<br>>
<br>> Thanks for help,
<br>> Dirk V. Schesmer</blockquote>
</html>

--------------480F7E616724870EFDB49D62--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Access to XML header properties: How? [message #567446 is a reply to message #17210] Wed, 09 April 2003 20:10 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
--------------B9FE08DD863A262E6F64F0F1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dirk,

With the help of Sandy Gao from the Xerces team I was able to hack out a
solution. It's not pretty, but it works. So the resource will be able
to auto detect the encoding during load and will use it during save.
Naturally when you create a new resource/schema from scratch, you'll
need to set it as outlined below...


Ed Merks wrote:

> Dirk,
>
> I was hoping to be able to detect the encoding when reading a document
> but this Xerces FAQ answer for how to do that
>
> http://xml.apache.org/xerces2-j/faq-general.html#faq-5
>
> doesn't work for the version of Xerces being used in Eclipse. :-(
>
> When we switch to a version where it works, the resource will
> determine the encoding during load and will use it during save. Until
> that time, you will need to manually specify the encoding used during
> save. There will be two ways to do this. Either do it as an override
> during each save:
>
> Map map = new HashMap();
> map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
> xsdSchema.eResource().save(out, map);
>
> or set it as the default so that it happens for every subsequent save:
>
> // This only needs to be done once
> ((XSDResourceImpl)xsdSchema.eResou
> ce()).getDefaultSaveOptions().put(XSDResourceImpl.XSD_ENCODI NG,
> "ISO-8859-1");
> xsdSchema.eResource().save(out, null);
>
> If the XML parser we use could detect the encoding, then the option
> would be set during load...
>
> I'm hoping to get a 1.1.0 driver out this week, but it may not be
> until next week...
>
>
> Ed Merks wrote:
>
>> Dirk,
>>
>> Being from the center of the universe, I did not consider how to do
>> this. (Actually I was born in Europe, and Canada is hardly the
>> center of
>> the universe. ;-) Clearly this capability needs to be supported, so
>> I
>> will consider how best to do that and get back to you with a
>> solution as
>> soon as possible. I'll probably provide support for access to
>> XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
>> option. The default save option will be set if and when the .xsd is
>>
>> loaded and can then be overriden directly or by passing an option in
>>
>> during save...
>>
>> "Dirk V. Schesmer" wrote:
>>
>> > Hi all,
>> >
>> > being from Europe, I'd like to specify the following XML header
>> using
>> > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
>> > encoding="ISO-8859-1"?>
>> >
>> > Can someone please show me the corresponding Java statements?
>> >
>> > Thanks for help,
>> > Dirk V. Schesmer
>

--------------B9FE08DD863A262E6F64F0F1
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Dirk,
<p>With the help of Sandy Gao from the Xerces team I was able to hack out
a solution.&nbsp; It's not pretty, but it works.&nbsp; So the resource
will be able to auto detect the encoding during load and will use it during
save.&nbsp; Naturally when you create a new resource/schema from scratch,
you'll need to set it as outlined below...
<br>&nbsp;
<p>Ed Merks wrote:
<blockquote TYPE=CITE>Dirk,
<p>I was hoping to be able to detect the encoding when reading a document
but this Xerces FAQ answer for how to do that
<blockquote><a href="http://xml.apache.org/xerces2-j/faq-general.html#faq-5">http://xml.apache.org/xerces2-j/faq-general.html#faq-5</a></blockquote>
doesn't work for the version of Xerces being used in Eclipse.&nbsp;&nbsp;
:-(
<p>When we switch to a version where it works, the resource will determine
the encoding during load and will use it during save.&nbsp; Until that
time, you will need to manually specify the encoding used during save.&nbsp;
There will be two ways to do this.&nbsp; Either do it as an override during
each save:
<blockquote>Map map = new HashMap();
<br>map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
<br>xsdSchema.eResource().save(out, map);</blockquote>
or set it as the default so that it happens for every subsequent save:
<blockquote>// This only needs to be done once
<br> ((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDResourceImpl.XSD_ENCODING,
"ISO-8859-1");
<br>xsdSchema.eResource().save(out, null);</blockquote>
If the XML parser we use could detect the encoding, then the option would
be set during load...
<p>I'm hoping to get a 1.1.0 driver out this week, but it may not be until
next week...
<br>&nbsp;
<p>Ed Merks wrote:
<blockquote TYPE=CITE>Dirk,
<p>Being from the center of the universe, I did not consider how to do
<br>this.&nbsp; (Actually I was born in Europe, and Canada is hardly the
center of
<br>the universe. ;-)&nbsp; Clearly this capability needs to be supported,
so I
<br>will consider how best to do that and get back to you with a solution
as
<br>soon as possible.&nbsp; I'll probably provide support for access to
<br>XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
<br>option.&nbsp; The default save option will be set if and when the .xsd
is
<br>loaded and can then be overriden directly or by passing an option in
<br>during save...
<p>"Dirk V. Schesmer" wrote:
<p>> Hi all,
<br>>
<br>> being from Europe, I'd like to specify the following XML header using
<br>> ISO-8859-1 encoding for my XML schemas: &lt;?xml version="1.0"
<br>> encoding="ISO-8859-1"?>
<br>>
<br>> Can someone please show&nbsp; me the corresponding Java statements?
<br>>
<br>> Thanks for help,
<br>> Dirk V. Schesmer</blockquote>
</blockquote>
</html>

--------------B9FE08DD863A262E6F64F0F1--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Access to XML header properties: How? [message #568187 is a reply to message #17238] Thu, 01 May 2003 06:54 Go to previous message
Eclipse UserFriend
Originally posted by: paechoi.earthlink.net

I see the v1.1 in the CVS, but not on the release web page. The latest is
shown as:

March 26th - Release Version 1.0.2 build (20030326_0335VL) is available for
download

When would be the date we can expect the official release of 1.1 that
support
the XSDResourceImpl.XSD_ENCODING?


Pae



"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3E947E3D.CF030F24@ca.ibm.com...
Dirk,
With the help of Sandy Gao from the Xerces team I was able to hack out a
solution. It's not pretty, but it works. So the resource will be able to
auto detect the encoding during load and will use it during save. Naturally
when you create a new resource/schema from scratch, you'll need to set it as
outlined below...

Ed Merks wrote:
Dirk,
I was hoping to be able to detect the encoding when reading a document but
this Xerces FAQ answer for how to do that
http://xml.apache.org/xerces2-j/faq-general.html#faq-5
doesn't work for the version of Xerces being used in Eclipse. :-(
When we switch to a version where it works, the resource will determine the
encoding during load and will use it during save. Until that time, you will
need to manually specify the encoding used during save. There will be two
ways to do this. Either do it as an override during each save:
Map map = new HashMap();
map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
xsdSchema.eResource().save(out, map);
or set it as the default so that it happens for every subsequent save:
// This only needs to be done once
((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDReso
urceImpl.XSD_ENCODING, "ISO-8859-1");
xsdSchema.eResource().save(out, null);
If the XML parser we use could detect the encoding, then the option would be
set during load...
I'm hoping to get a 1.1.0 driver out this week, but it may not be until next
week...

Ed Merks wrote:
Dirk,
Being from the center of the universe, I did not consider how to do
this. (Actually I was born in Europe, and Canada is hardly the center of
the universe. ;-) Clearly this capability needs to be supported, so I
will consider how best to do that and get back to you with a solution as
soon as possible. I'll probably provide support for access to
XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
option. The default save option will be set if and when the .xsd is
loaded and can then be overriden directly or by passing an option in
during save...
"Dirk V. Schesmer" wrote:
> Hi all,
>
> being from Europe, I'd like to specify the following XML header using
> ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> encoding="ISO-8859-1"?>
>
> Can someone please show me the corresponding Java statements?
>
> Thanks for help,
> Dirk V. Schesmer
Re: Access to XML header properties: How? [message #568217 is a reply to message #18929] Thu, 01 May 2003 09:43 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Pae,

If all goes well, the plan is to make it available today (and to populate CVS
with all the source code).


Pae Choi wrote:

> I see the v1.1 in the CVS, but not on the release web page. The latest is
> shown as:
>
> March 26th - Release Version 1.0.2 build (20030326_0335VL) is available for
> download
>
> When would be the date we can expect the official release of 1.1 that
> support
> the XSDResourceImpl.XSD_ENCODING?
>
> Pae
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3E947E3D.CF030F24@ca.ibm.com...
> Dirk,
> With the help of Sandy Gao from the Xerces team I was able to hack out a
> solution. It's not pretty, but it works. So the resource will be able to
> auto detect the encoding during load and will use it during save. Naturally
> when you create a new resource/schema from scratch, you'll need to set it as
> outlined below...
>
> Ed Merks wrote:
> Dirk,
> I was hoping to be able to detect the encoding when reading a document but
> this Xerces FAQ answer for how to do that
> http://xml.apache.org/xerces2-j/faq-general.html#faq-5
> doesn't work for the version of Xerces being used in Eclipse. :-(
> When we switch to a version where it works, the resource will determine the
> encoding during load and will use it during save. Until that time, you will
> need to manually specify the encoding used during save. There will be two
> ways to do this. Either do it as an override during each save:
> Map map = new HashMap();
> map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
> xsdSchema.eResource().save(out, map);
> or set it as the default so that it happens for every subsequent save:
> // This only needs to be done once
> ((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDReso
> urceImpl.XSD_ENCODING, "ISO-8859-1");
> xsdSchema.eResource().save(out, null);
> If the XML parser we use could detect the encoding, then the option would be
> set during load...
> I'm hoping to get a 1.1.0 driver out this week, but it may not be until next
> week...
>
> Ed Merks wrote:
> Dirk,
> Being from the center of the universe, I did not consider how to do
> this. (Actually I was born in Europe, and Canada is hardly the center of
> the universe. ;-) Clearly this capability needs to be supported, so I
> will consider how best to do that and get back to you with a solution as
> soon as possible. I'll probably provide support for access to
> XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
> option. The default save option will be set if and when the .xsd is
> loaded and can then be overriden directly or by passing an option in
> during save...
> "Dirk V. Schesmer" wrote:
> > Hi all,
> >
> > being from Europe, I'd like to specify the following XML header using
> > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> > encoding="ISO-8859-1"?>
> >
> > Can someone please show me the corresponding Java statements?
> >
> > Thanks for help,
> > Dirk V. Schesmer


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Access to XML header properties: How? [message #568867 is a reply to message #18951] Fri, 02 May 2003 10:31 Go to previous message
Eclipse UserFriend
Originally posted by: paechoi.earthlink.net

Ed,

Thanks for sharing your plan as well as your prompt reply. I just
check [1]the web site and I am seeing it.

While I was reading the "1. New Plugins" section, I just had a
question for the statement as follows:

"The xsd2ecore plugins (org.eclipse.emf.mapping.xsd2ecore and
org.eclipse.emf.mapping.xsd2ecore.editor) have been added"

Would you clarify whether we need to get a specific version of
EMF package or those new plugins are added in the XSD package?
Thank you.

Regards,


Pae


[1] http://www.eclipse.org/xsd/


"Ed Merks" <merks@ca.ibm.com> wrote in message
news:3EB0EC2F.A43ED204@ca.ibm.com...
> Pae,
>
> If all goes well, the plan is to make it available today (and to populate
CVS
> with all the source code).
>
>
> Pae Choi wrote:
>
> > I see the v1.1 in the CVS, but not on the release web page. The latest
is
> > shown as:
> >
> > March 26th - Release Version 1.0.2 build (20030326_0335VL) is available
for
> > download
> >
> > When would be the date we can expect the official release of 1.1 that
> > support
> > the XSDResourceImpl.XSD_ENCODING?
> >
> > Pae
> >
> > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > news:3E947E3D.CF030F24@ca.ibm.com...
> > Dirk,
> > With the help of Sandy Gao from the Xerces team I was able to hack out a
> > solution. It's not pretty, but it works. So the resource will be able
to
> > auto detect the encoding during load and will use it during save.
Naturally
> > when you create a new resource/schema from scratch, you'll need to set
it as
> > outlined below...
> >
> > Ed Merks wrote:
> > Dirk,
> > I was hoping to be able to detect the encoding when reading a document
but
> > this Xerces FAQ answer for how to do that
> > http://xml.apache.org/xerces2-j/faq-general.html#faq-5
> > doesn't work for the version of Xerces being used in Eclipse. :-(
> > When we switch to a version where it works, the resource will determine
the
> > encoding during load and will use it during save. Until that time, you
will
> > need to manually specify the encoding used during save. There will be
two
> > ways to do this. Either do it as an override during each save:
> > Map map = new HashMap();
> > map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
> > xsdSchema.eResource().save(out, map);
> > or set it as the default so that it happens for every subsequent save:
> > // This only needs to be done once
> >
((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDReso
> > urceImpl.XSD_ENCODING, "ISO-8859-1");
> > xsdSchema.eResource().save(out, null);
> > If the XML parser we use could detect the encoding, then the option
would be
> > set during load...
> > I'm hoping to get a 1.1.0 driver out this week, but it may not be until
next
> > week...
> >
> > Ed Merks wrote:
> > Dirk,
> > Being from the center of the universe, I did not consider how to do
> > this. (Actually I was born in Europe, and Canada is hardly the center
of
> > the universe. ;-) Clearly this capability needs to be supported, so I
> > will consider how best to do that and get back to you with a solution as
> > soon as possible. I'll probably provide support for access to
> > XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
> > option. The default save option will be set if and when the .xsd is
> > loaded and can then be overriden directly or by passing an option in
> > during save...
> > "Dirk V. Schesmer" wrote:
> > > Hi all,
> > >
> > > being from Europe, I'd like to specify the following XML header using
> > > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> > > encoding="ISO-8859-1"?>
> > >
> > > Can someone please show me the corresponding Java statements?
> > >
> > > Thanks for help,
> > > Dirk V. Schesmer
>
Re: Access to XML header properties: How? [message #568908 is a reply to message #19465] Fri, 02 May 2003 10:49 Go to previous message
Eclipse UserFriend
Originally posted by: paechoi.earthlink.net

I found it. Please discard the inquiry related to those new plugins.

Regards,


Pae


"Pae Choi" <paechoi@earthlink.net> wrote in message
news:b8thc0$g8k$1@rogue.oti.com...
> Ed,
>
> Thanks for sharing your plan as well as your prompt reply. I just
> check [1]the web site and I am seeing it.
>
> While I was reading the "1. New Plugins" section, I just had a
> question for the statement as follows:
>
> "The xsd2ecore plugins (org.eclipse.emf.mapping.xsd2ecore and
> org.eclipse.emf.mapping.xsd2ecore.editor) have been added"
>
> Would you clarify whether we need to get a specific version of
> EMF package or those new plugins are added in the XSD package?
> Thank you.
>
> Regards,
>
>
> Pae
>
>
> [1] http://www.eclipse.org/xsd/
>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:3EB0EC2F.A43ED204@ca.ibm.com...
> > Pae,
> >
> > If all goes well, the plan is to make it available today (and to
populate
> CVS
> > with all the source code).
> >
> >
> > Pae Choi wrote:
> >
> > > I see the v1.1 in the CVS, but not on the release web page. The latest
> is
> > > shown as:
> > >
> > > March 26th - Release Version 1.0.2 build (20030326_0335VL) is
available
> for
> > > download
> > >
> > > When would be the date we can expect the official release of 1.1 that
> > > support
> > > the XSDResourceImpl.XSD_ENCODING?
> > >
> > > Pae
> > >
> > > "Ed Merks" <merks@ca.ibm.com> wrote in message
> > > news:3E947E3D.CF030F24@ca.ibm.com...
> > > Dirk,
> > > With the help of Sandy Gao from the Xerces team I was able to hack out
a
> > > solution. It's not pretty, but it works. So the resource will be
able
> to
> > > auto detect the encoding during load and will use it during save.
> Naturally
> > > when you create a new resource/schema from scratch, you'll need to set
> it as
> > > outlined below...
> > >
> > > Ed Merks wrote:
> > > Dirk,
> > > I was hoping to be able to detect the encoding when reading a document
> but
> > > this Xerces FAQ answer for how to do that
> > > http://xml.apache.org/xerces2-j/faq-general.html#faq-5
> > > doesn't work for the version of Xerces being used in Eclipse. :-(
> > > When we switch to a version where it works, the resource will
determine
> the
> > > encoding during load and will use it during save. Until that time,
you
> will
> > > need to manually specify the encoding used during save. There will be
> two
> > > ways to do this. Either do it as an override during each save:
> > > Map map = new HashMap();
> > > map.put(XSDResourceImpl.XSD_ENCODING, "ISO-8859-1");
> > > xsdSchema.eResource().save(out, map);
> > > or set it as the default so that it happens for every subsequent save:
> > > // This only needs to be done once
> > >
>
((XSDResourceImpl)xsdSchema.eResource()).getDefaultSaveOptio ns().put(XSDReso
> > > urceImpl.XSD_ENCODING, "ISO-8859-1");
> > > xsdSchema.eResource().save(out, null);
> > > If the XML parser we use could detect the encoding, then the option
> would be
> > > set during load...
> > > I'm hoping to get a 1.1.0 driver out this week, but it may not be
until
> next
> > > week...
> > >
> > > Ed Merks wrote:
> > > Dirk,
> > > Being from the center of the universe, I did not consider how to do
> > > this. (Actually I was born in Europe, and Canada is hardly the center
> of
> > > the universe. ;-) Clearly this capability needs to be supported, so I
> > > will consider how best to do that and get back to you with a solution
as
> > > soon as possible. I'll probably provide support for access to
> > > XSDResourceImpl.getDefaultSaveOptions() and support an XSD_ENCODING
> > > option. The default save option will be set if and when the .xsd is
> > > loaded and can then be overriden directly or by passing an option in
> > > during save...
> > > "Dirk V. Schesmer" wrote:
> > > > Hi all,
> > > >
> > > > being from Europe, I'd like to specify the following XML header
using
> > > > ISO-8859-1 encoding for my XML schemas: <?xml version="1.0"
> > > > encoding="ISO-8859-1"?>
> > > >
> > > > Can someone please show me the corresponding Java statements?
> > > >
> > > > Thanks for help,
> > > > Dirk V. Schesmer
> >
>
>
Previous Topic:A Diagnostic Message for the Valid Schema
Next Topic:XSD v1.0.2 -- Undesired Messages
Goto Forum:
  


Current Time: Thu Apr 25 01:02:02 GMT 2024

Powered by FUDForum. Page generated in 0.04328 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top