��� Hello. I want to report a problem in the Xerces serializer that to me seems a bug. The prolems arises when we�use Xerces to parse and serialize into strings DOM representations of�XSL stylesheets. In some of them we notices a wrong behaviour of the tool: for example when Xerces encounters, during�a serialization process, a situation in which�there are two apostrophes ( ' )�symbols enclosed in two quotes symbol ( " ), the DOM serialized in a string has the apostrophes escaped with the corresponding entities ( ' ). An example of�stylesheet that causes such a behaviour is this one (the wrong situation arises when processing line 28 which, after the serialization, becomes: ��� <font face="Arial" style="color:#000000; font-family: 'Arial'; font-weight:bold; text-decoration:none; margin-left:5px; text-indent:0px;font-size:13pt;"> (note the ' entities). 1 �<stylesheet ino:id="2" xmlns:ino=" http://namespaces.softwareag.com/tamino/response2"> 2 ��� <metainfo description="dsgsdgs" id="766" name="project"> 3 ��� <ancestors> 4 ��� ��� <ancestor id="163" type="project"></ancestor> 5 ��� ��� <ancestor id="299" type="view"></ancestor> 6 ��� </ancestors> 7 ��� </metainfo> 8 ��� <usedresources></usedresources> 9 ��� <stylesheetdata> 10��� ��� <xsl:stylesheet version="1.0" xmlns=" http://www.w3.org/TR/REC-html40" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"> 11�� ��� ��� <xsl:output indent="yes" method="html"></xsl:output> 12��� ��� ��� <xsl:strip-space elements="*"></xsl:strip-space> 13��� ��� ��� <xsl:template match="*|/"> 14��� ��� ��� ��� <xsl:apply-templates></xsl:apply-templates> 15��� ��� ��� </xsl:template> 16��� ��� ��� <xsl:template match="text()|@*"> 17��� ��� ��� ��� <xsl:value-of select="."></xsl:value-of> 18��� ��� ��� </xsl:template> 19����������� <xsl:template match="page"> 20��� ��� ��� ��� <HTML> 21��� ��� ��� ��� ��� <HEAD> 22��� ��� ��� ��� ��� ��� <title>Project </title> 23��� ��� ��� ��� ��� </HEAD> 24��� ��� ��� ��� ��� <BODY background="imgs/sfondo_azz.gif" bgcolor=" #FFFFFF"> 25��� ��� ��� ��� ��� ��� <IMG align="absmiddle" border="0" src ="imgs/logo.gif"></IMG> 26��� ��� ��� ��� ��� ��� <br></br> 27��� ��� ��� ��� ��� ��� <br></br> 28��� ��� ��� ��� ��� ��� <font face="Arial" style="color:#000000; font-family:'Arial'; font-weight:bold; text-decoration:none; margin-left:5px; text-indent:0px;font-size:13pt;"> 29��� ��� ��� ��� ��� ��� ��� <b>Page Name <xsl:value-of select=" @label"></xsl:value-of></b> 30��� ��� ��� ��� ��� ��� </font> 31��� ��� ��� ��� ��� ��� <br></br> 32��� ��� ��� ��� ��� ��� <br></br> 33��� ��� ��� ��� ��� ��� <xsl:apply-templates select ="takes/take"></xsl:apply-templates> 34��� ��� ��� ��� ��� </BODY> 35��� ��� ��� ��� </HTML> 36��� ��� ��� </xsl:template> 37��� ��� ��� <xsl:template match="take"> 38��� ��� ��� ��� <IMG align="absmiddle" border="0"> 39��� ��� ��� ��� <xsl:attribute name="src"> 40��� ��� ��� ��� ��� <xsl:value-of select ="immaginedeltake"></xsl:value-of> 41��� ��� ��� ��� </xsl:attribute> 42��� ��� ��� ��� </IMG> 43��� ��� ��� ��� <font face="Arial" style="font-weight: normal; color: #000000; text-decoration: none;"> 44��� ��� ��� ��� ��� <xsl:value-of select="corpodeltake"></xsl:value-of> 45��� ��� ��� ��� </font> 46��� ��� ��� ��� <br></br> 47��� ��� ��� </xsl:template> 48��� ��� </xsl:stylesheet> 49��� </stylesheetdata> 50 </stylesheet> I've made some debug with the Xerces code and I've found out that the class XMLSerializer uses the method printEscaped when�serializing�a tag's attribute value. Substituting this method with _printer.printText, the XSL is correctly serialized. I've tried to understand why you have used the method printEscaped to print a tag's attribute value, and it seems that you have chosen to do this for correct printing reasons, but the correct XSL is the one obtained without escaping, maybe this behaviour is correct in the case of HTMl documents serializing. What do you think about this ? Please let me know because we want to use Xrerces for serializing XSL documents, but we want to clarify this situation before. Attached to this mail is the XSL stylesheet before reported�used for testing the serializer, and below are some additional pieces of information: -�Xerces version number: 1.3.1, 1.4.1 - JDK version number: 1.3.0 Goodbye and thank you in advance for your help. --------------------------------------------------- Davide Pozzi Junior Software Engineer Office phone: +39.02.25771.234 e-mail: [EMAIL PROTECTED] TXT e-solutions Via Frigia 27 20126 Milano ---------------------------------------------------
=?iso-8859-1?Q?provastylesheet.xsl?=
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
