[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: encoding shift_jis into an attribute

Subject: RE: encoding shift_jis into an attribute
From: "Josh Canfield" <Josh.Canfield@xxxxxxxxxxxx>
Date: Thu, 3 Jun 2004 11:18:34 -0700
josh canfield
I may have missed it if you mentioned it earlier, but why is it important to have the output this way?

-----Original Message-----
From: Matthew Simoneau [mailto:Matthew.Simoneau@xxxxxxxxxxxxx]
Sent: Thursday, June 03, 2004 10:23 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  encoding shift_jis into an attribute


I found a solution to my problem.  Since I received so much help from
this newsgroup, I wanted to share my solution.  I'm building up the
surrounding text via xsl:text with disable-output-escaping="yes" so the
markup passes through.  Then I use xsl:value-of to get the numeric
character reference escaped text in the middle of the attribute.  It's a
little hacky, but it works.  You can see the details below.  Hopefully I
won't have any problems integrating this into my large stylesheet.

Thanks again for your help, everyone!

Sincerely,
Matthew Simoneau
The MathWorks, Inc.


<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html"/>

<xsl:template match="test">
  <html>
    <body>

<xsl:text disable-output-escaping="yes">&lt;a
href="matlab:disp('</xsl:text>
<xsl:value-of select="label"/>
<xsl:text disable-output-escaping="yes">')"&gt;foo&lt;a&gt;</xsl:text>

    </body>
  </html>
</xsl:template>

</xsl:stylesheet>


--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.