You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Vladimir Loubenski <vl...@opentext.com> on 2013/02/19 19:59:27 UTC
xml version='1.1' doesn't support Ctrl characters for characters
Hi,
I have XML documents version 1.1 where text node contains CTRL characters (0x01, 0x02,...). I am receives error massage " Error [invalid character 0x1] happened during processing XML data." during their parsing .
But character 0x1 is valid for xml version 1.1 and Xerces C++ 3.1.1 supports XML 1.1 (First Edition).
Regards,
Vladimir.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
RE: xml version='1.1' doesn't support Ctrl characters for characters
Posted by Vladimir Loubenski <vl...@opentext.com>.
I found a bug in my code. setXmlVersion(L"1.1") needs to be called for DOMDocument before DOM serialization.
After the fix I receive proper escaping ().
Regards,
Vladimir.
-----Original Message-----
From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
Sent: February-19-13 5:07 PM
To: c-dev@xerces.apache.org
Subject: RE: xml version='1.1' doesn't support Ctrl characters for characters
Hi Vladimir,
That sounds like a bug in the serializer. I would expect it to produce a well-formed XML 1.1 document by escaping the control characters.
Thanks.
Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Vladimir Loubenski <vl...@opentext.com> wrote on 19/02/2013 04:55:25
PM:
> Hi Michael,
> You are right. All these XML documents didn't escape with a character
> reference. They were created using DOMLSSerializer .
> Manually escaping CTRL characters with a character reference resolve
> the problem . So question is how to get properly escaped the CTRL
> characters using DOMLSSerializer with writeToString call?
>
> Regards,
> Vladimir.
>
>
> -----Original Message-----
> From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
> Sent: February-19-13 2:12 PM
> To: c-dev@xerces.apache.org
> Subject: Re: xml version='1.1' doesn't support Ctrl characters for
characters
>
> The control characters: ([#x1-#x8] | [#xB-#xC] | [#xE-#x1F] |
[#x7F-#x84]
> | [#x86-#x9F]) are only allowed in an XML 1.1 document if they've been
> escaped with a character reference [1]. Are you sure you did that?
>
> Thanks.
>
> [1] http://www.w3.org/TR/xml11/#sec-references
>
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
> Vladimir Loubenski <vl...@opentext.com> wrote on 19/02/2013
> 01:59:27
> PM:
>
> > Hi,
> > I have XML documents version 1.1 where text node contains CTRL
> > characters (0x01, 0x02,...). I am receives error massage " Error
> > [invalid character 0x1] happened during processing XML data." during
> > their parsing .
> > But character 0x1 is valid for xml version 1.1 and Xerces C++ 3.1.1
> > supports XML 1.1 (First Edition).
> >
> > Regards,
> > Vladimir.
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
RE: xml version='1.1' doesn't support Ctrl characters for characters
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Vladimir,
That sounds like a bug in the serializer. I would expect it to produce a
well-formed XML 1.1 document by escaping the control characters.
Thanks.
Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Vladimir Loubenski <vl...@opentext.com> wrote on 19/02/2013 04:55:25
PM:
> Hi Michael,
> You are right. All these XML documents didn't escape with a
> character reference. They were created using DOMLSSerializer .
> Manually escaping CTRL characters with a character reference resolve
> the problem . So question is how to get properly escaped the CTRL
> characters using DOMLSSerializer with writeToString call?
>
> Regards,
> Vladimir.
>
>
> -----Original Message-----
> From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
> Sent: February-19-13 2:12 PM
> To: c-dev@xerces.apache.org
> Subject: Re: xml version='1.1' doesn't support Ctrl characters for
characters
>
> The control characters: ([#x1-#x8] | [#xB-#xC] | [#xE-#x1F] |
[#x7F-#x84]
> | [#x86-#x9F]) are only allowed in an XML 1.1 document if they've been
> escaped with a character reference [1]. Are you sure you did that?
>
> Thanks.
>
> [1] http://www.w3.org/TR/xml11/#sec-references
>
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
> Vladimir Loubenski <vl...@opentext.com> wrote on 19/02/2013 01:59:27
> PM:
>
> > Hi,
> > I have XML documents version 1.1 where text node contains CTRL
> > characters (0x01, 0x02,...). I am receives error massage " Error
> > [invalid character 0x1] happened during processing XML data." during
> > their parsing .
> > But character 0x1 is valid for xml version 1.1 and Xerces C++ 3.1.1
> > supports XML 1.1 (First Edition).
> >
> > Regards,
> > Vladimir.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
RE: xml version='1.1' doesn't support Ctrl characters for characters
Posted by Vladimir Loubenski <vl...@opentext.com>.
Hi Michael,
You are right. All these XML documents didn't escape with a character reference. They were created using DOMLSSerializer . Manually escaping CTRL characters with a character reference resolve the problem . So question is how to get properly escaped the CTRL characters using DOMLSSerializer with writeToString call?
Regards,
Vladimir.
-----Original Message-----
From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com]
Sent: February-19-13 2:12 PM
To: c-dev@xerces.apache.org
Subject: Re: xml version='1.1' doesn't support Ctrl characters for characters
The control characters: ([#x1-#x8] | [#xB-#xC] | [#xE-#x1F] | [#x7F-#x84]
| [#x86-#x9F]) are only allowed in an XML 1.1 document if they've been
escaped with a character reference [1]. Are you sure you did that?
Thanks.
[1] http://www.w3.org/TR/xml11/#sec-references
Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Vladimir Loubenski <vl...@opentext.com> wrote on 19/02/2013 01:59:27
PM:
> Hi,
> I have XML documents version 1.1 where text node contains CTRL
> characters (0x01, 0x02,...). I am receives error massage " Error
> [invalid character 0x1] happened during processing XML data." during
> their parsing .
> But character 0x1 is valid for xml version 1.1 and Xerces C++ 3.1.1
> supports XML 1.1 (First Edition).
>
> Regards,
> Vladimir.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
Re: xml version='1.1' doesn't support Ctrl characters for characters
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
The control characters: ([#x1-#x8] | [#xB-#xC] | [#xE-#x1F] | [#x7F-#x84]
| [#x86-#x9F]) are only allowed in an XML 1.1 document if they've been
escaped with a character reference [1]. Are you sure you did that?
Thanks.
[1] http://www.w3.org/TR/xml11/#sec-references
Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Vladimir Loubenski <vl...@opentext.com> wrote on 19/02/2013 01:59:27
PM:
> Hi,
> I have XML documents version 1.1 where text node contains CTRL
> characters (0x01, 0x02,...). I am receives error massage " Error
> [invalid character 0x1] happened during processing XML data." during
> their parsing .
> But character 0x1 is valid for xml version 1.1 and Xerces C++ 3.1.1
> supports XML 1.1 (First Edition).
>
> Regards,
> Vladimir.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org