[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Sep MSXML: Carriage Return, #XD, Does Not Work
Mike Brown <mike@xxxxxxxx> wrote <The explanation is probably in here: < < http://www.w3.org/TR/xslt#strip < http://www.w3.org/TR/REC-xml#AVNormalize < http://www.w3.org/TR/xslt#creating-attributes [NOTE at end] < <It depends on what exactly you are doing. Provide a code sample. Thanks for the reply. I did check out the 3rd reference (the NOTE in particular). ie. "NOTE: When an xsl:attribute contains a text node with a newline, then the XML output must contain a character reference. " However, we have a text node with a character reference. So, what should happen here - the character reference should not be normalized? The problem is that Saxon (SAXON 5.4.1 from Michael Kay of ICL) does what we want; the July release of MSXML did, too but the September MSXML release doesn't. We use IE version 5.00.2919.6307CO (that's from the About). In other words, via Saxon and July MSXML you can produce HTML that shows a 2 column tooltip when the cursur hovers over the name. However, via Sep MSXML, the tool tip is not in 2 columns; it has #xA in place of a newline. This looks ugly and is the reason we reverted to the July release. Here are the code samples: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="contact.xsl"?> <contact_details_get_response> <contact> <prefix>Mr</prefix> <first_name>Trevor</first_name> <last_name>Zeltner</last_name> <company_name>ACIRT</company_name> <work_phone_no>02 62571599</work_phone_no> <fax_no>02 6249 1247</fax_no> <position>Chairman</position> </contact> </contact_details_get_response> <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="*|/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="text()|@*"> <xsl:value-of select="."/> </xsl:template> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <body topmargin="0" rightmargin="0"> <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="khaki"> <tbody> <xsl:for-each select="contact_details_get_response/contact"> <tr bgcolor="lightgoldenrodyellow"> <xsl:attribute name="title"> <xsl:text>Company:	</xsl:text><xsl:value-of select="company_name"/><xsl:text>
</xsl:text> <xsl:text>Position:	</xsl:text><xsl:value-of select="position"/><xsl:text>
</xsl:text> <xsl:text>Fax:		</xsl:text><xsl:value-of select="fax_no"/><xsl:text>
</xsl:text> </xsl:attribute> <xsl:attribute name="prefix"><xsl:value-of select="prefix" /></xsl:attribute> <xsl:attribute name="fname"><xsl:value-of select="first_name" /></xsl:attribute> <xsl:attribute name="lname"><xsl:value-of select="last_name" /></xsl:attribute> <td class="rownormal" width="20%"> <xsl:value-of select="prefix"/>  <xsl:value-of select="first_name"/>  <xsl:value-of select="last_name"/> </td> <td class="rownormal" width="12%"><xsl:value-of select="work_phone_no"/></td> </tr> </xsl:for-each> </tbody> </table> </body> </html> </xsl:template> </xsl:stylesheet> Jonathan ps. I'm subscribed to the digest so my response is quite slow but I've just subscribed to the list as well so I should be able to respond more quickly. This email message and any accompanying attachments may contain information that is confidential and is subject to legal privilege. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of AMP/GIO. Before opening any attachments, please check them for viruses and defects. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|