Maarten, I believe you are correct that xmlbeans 2.0.0 did not escape the '>' in "]]>" when it's not the end of a CDATA section. This was fixed in 2.1.0. See http://issues.apache.org/jira/browse/XMLBEANS-192. Frank, since you obviously have looked at xmlbeans src, take a look at test/src/misc/detailed/CharEscapeTest.java. You'll find there examples of how to use XmlOptionCharEscapeMap in conjunction with XmlOptions.setSaveSubstituteCharacters(). - Wing Yew
-----Original Message----- From: Radu Preotiuc-Pietro Sent: Thursday, July 27, 2006 10:31 AM To: user@xmlbeans.apache.org Subject: RE: why are > and apostroph not escaped in attributes ? Hm, I think you mean XMLBeans is not doing the "MUST, for compatibility, be escaped using either ">" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section" part, right? But the rest is done as per spec. Radu -----Original Message----- From: Maarten Bosteels [mailto:[EMAIL PROTECTED] Sent: Thursday, July 27, 2006 4:20 AM To: user@xmlbeans.apache.org Subject: Re: why are > and apostroph not escaped in attributes ? >From http://www.w3.org/TR/REC-xml/ -------------------- The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they MUST be escaped using either numeric character references or the strings "&" and "<" respectively. The right angle bracket (>) MAY be represented using the string ">", and MUST, for compatibility, be escaped using either ">" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section. In the content of elements, character data is any string of characters which does not contain the start-delimiter of any markup and does not include the CDATA-section-close delimiter, "]]>". In a CDATA section, character data is any string of characters not including the CDATA-section-close delimiter, "]]>". To allow attribute values to contain both single and double quotes, the apostrophe or single-quote character (') MAY be represented as "'", and the double-quote character (") as """. ------------------ It seems that xmlbeans 2.0.0 does not escape "<" when it appears in the string "]]>" I haven't tested it with later versions. Maarten On 7/27/06, Weiler, Frank (KBV) <[EMAIL PROTECTED]> wrote: > Hello from Berlin ! > > I just wonder, why the code of Saver.entitizeAttrValue() contains escaping for < to < but not > to >. > Is the use of > and apostroph restricted in attribute values ? > > And next question: Has someone use sucessfull the XMLOptions.setSaveSubstituteCcharacters() -method ? > > Regards ? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]