Re: illegal character

2002-06-25 Thread J.Pietschmann
Xiao Yang wrote:
Ok, I think I know what's going on here. The illegal
characters are apos and quotes. I am generating a xml
document from a text field in sql server. I am using
the JDBC driver from microsoft to get it. the driver
probably does not know how to copy apos and quotes and
replace them with these illegal xml characters (x19,
xc1).  my questions now becomes how can I look for and
replace these illegal xml characters in the xml
document. I am using the xerces parser from apache. Is
there a way for the parser to pick up on these illegal
characters?
I'd try to replace the characters before they are fed into
the parser. Are you getting a string containing the XML
from the driver? Or some string data? Use replace() on
this string.
BTW U+00C1 is a valid XML character.
J.Pietschmann


Re: illegal character

2002-06-25 Thread Oleg Tkachenko
Xiao Yang wrote:
Ok, I think I know what's going on here. The illegal
characters are apos and quotes. I am generating a xml
document from a text field in sql server. I am using
the JDBC driver from microsoft to get it. the driver
probably does not know how to copy apos and quotes and
replace them with these illegal xml characters (x19,
xc1).  my questions now becomes how can I look for and
replace these illegal xml characters in the xml
document. I am using the xerces parser from apache. Is
there a way for the parser to pick up on these illegal
characters?
No way, xml in contrast to html is very picky about syntax.
Probably the problem has something to do with encodings, anyway you have to 
preprocess data form jdbc ResultSet to avoid such binary control chars in a text.

--
Oleg Tkachenko
Multiconn International Ltd, Israel


Re: illegal character

2002-06-25 Thread Xiao Yang
Hello

Ok, I think I know what's going on here. The illegal
characters are apos and quotes. I am generating a xml
document from a text field in sql server. I am using
the JDBC driver from microsoft to get it. the driver
probably does not know how to copy apos and quotes and
replace them with these illegal xml characters (x19,
xc1).  my questions now becomes how can I look for and
replace these illegal xml characters in the xml
document. I am using the xerces parser from apache. Is
there a way for the parser to pick up on these illegal
characters?

thanks
pauli 


--- Oleg Tkachenko <[EMAIL PROTECTED]> wrote:
> Not sure, that's some control character, "Device
> Control 3", but certanly it's 
> illegal charcter in xml 1.0 document (afaik, it's
> legal for xml 1.1).
> 
> Xiao Yang wrote:
> > Dear Oleg
> > 
> > your right, the apos is ok.  but I could have
> swore
> > the apos was causing the error before.  However, I
> got
> > this error in one of the transformation.  do you
> know
> > what character  is?
> > 
> > javax.xml.transform.TransformerException: Illegal
> XML
> > character:  .
> > 
> > thanks
> > pauli
> > 
> > 
> > 
> > --- Oleg Tkachenko <[EMAIL PROTECTED]> wrote:
> > 
> >>Xiao Yang wrote:
> >>
> >>
> >>>>I am using FOP to transform some bio into pdf
> >>>
> >>format. 
> >>
> >>>FOP generates an error when it encounters an
> >>
> >>illegal
> >>
> >>>character such as the apostrophe "'".  Where can
> I
> >>>find a list of illegal characters that FOP does
> >>
> >>not
> >>
> >>>accept?  I need to replace the illegal character
> >>
> >>with
> >>
> >>>their numeric entity reference.
> >>
> >>What is exactly the error? Apostrophe is not an
> >>illegal character at all, but 
> >>as it's used in xml markup to delimit attribute
> >>values, it's kinda special.
> >>And you don't need numeric entity reference,
> because
> >>' is predefined 
> >>entity. See xml spec for more details: 
> >>http://www.w3.org/TR/2000/REC-xml-20001006#syntax
> >>
> >>-- 
> >>Oleg Tkachenko
> >>Multiconn International Ltd, Israel
> >>
> > 
> > 
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> > 
> 
> 
> 
> -- 
> Oleg Tkachenko
> Multiconn International Ltd, Israel
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com


Re: illegal character

2002-06-24 Thread Oleg Tkachenko
Not sure, that's some control character, "Device Control 3", but certanly it's 
illegal charcter in xml 1.0 document (afaik, it's legal for xml 1.1).

Xiao Yang wrote:
Dear Oleg
your right, the apos is ok.  but I could have swore
the apos was causing the error before.  However, I got
this error in one of the transformation.  do you know
what character  is?
javax.xml.transform.TransformerException: Illegal XML
character:  .
thanks
pauli

--- Oleg Tkachenko <[EMAIL PROTECTED]> wrote:
Xiao Yang wrote:

I am using FOP to transform some bio into pdf

format. 

FOP generates an error when it encounters an
illegal
character such as the apostrophe "'".  Where can I
find a list of illegal characters that FOP does
not
accept?  I need to replace the illegal character
with
their numeric entity reference.
What is exactly the error? Apostrophe is not an
illegal character at all, but 
as it's used in xml markup to delimit attribute
values, it's kinda special.
And you don't need numeric entity reference, because
' is predefined 
entity. See xml spec for more details: 
http://www.w3.org/TR/2000/REC-xml-20001006#syntax

--
Oleg Tkachenko
Multiconn International Ltd, Israel

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
Oleg Tkachenko
Multiconn International Ltd, Israel


Re: illegal character

2002-06-24 Thread Xiao Yang
Dear Oleg

your right, the apos is ok.  but I could have swore
the apos was causing the error before.  However, I got
this error in one of the transformation.  do you know
what character  is?

javax.xml.transform.TransformerException: Illegal XML
character:  .

thanks
pauli



--- Oleg Tkachenko <[EMAIL PROTECTED]> wrote:
> Xiao Yang wrote:
> 
> > > I am using FOP to transform some bio into pdf
> format. 
> > FOP generates an error when it encounters an
> illegal
> > character such as the apostrophe "'".  Where can I
> > find a list of illegal characters that FOP does
> not
> > accept?  I need to replace the illegal character
> with
> > their numeric entity reference.
> What is exactly the error? Apostrophe is not an
> illegal character at all, but 
> as it's used in xml markup to delimit attribute
> values, it's kinda special.
> And you don't need numeric entity reference, because
> ' is predefined 
> entity. See xml spec for more details: 
> http://www.w3.org/TR/2000/REC-xml-20001006#syntax
> 
> -- 
> Oleg Tkachenko
> Multiconn International Ltd, Israel
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com


Re: illegal character

2002-06-24 Thread Oleg Tkachenko
Xiao Yang wrote:
> I am using FOP to transform some bio into pdf format. 
FOP generates an error when it encounters an illegal
character such as the apostrophe "'".  Where can I
find a list of illegal characters that FOP does not
accept?  I need to replace the illegal character with
their numeric entity reference.
What is exactly the error? Apostrophe is not an illegal character at all, but 
as it's used in xml markup to delimit attribute values, it's kinda special.
And you don't need numeric entity reference, because ' is predefined 
entity. See xml spec for more details: 
http://www.w3.org/TR/2000/REC-xml-20001006#syntax

--
Oleg Tkachenko
Multiconn International Ltd, Israel


illegal character

2002-06-24 Thread Xiao Yang
Hello,

I am using FOP to transform some bio into pdf format. 
FOP generates an error when it encounters an illegal
character such as the apostrophe "'".  Where can I
find a list of illegal characters that FOP does not
accept?  I need to replace the illegal character with
their numeric entity reference.

thanks
pauli

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com