xsl-list
[Top] [All Lists]

RE: [xsl] Character references and the dreaded d-o-e

2006-11-14 15:36:34
(You give the impression you are already doing this, but if you are, then
XML escaping should never appear in the output)

I thought this too, but I tried it again with output set to text, and sure 
enough the escaped characters appeared in output.  Along with, I might add, an 
XML document declaration!

I think there is something horribly broken with our implementation--perhaps 
whatever is invoking the transformation is overriding the output method.

Thanks,
b.

-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com]
Sent: Tuesday, November 14, 2006 3:17 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Character references and the dreaded d-o-e

Try

<xsl:output method="text"/>

(You give the impression you are already doing this, but if you are, then
XML escaping should never appear in the output)

Michael Kay
http://www.saxonica.com/

-----Original Message-----
From: Brian Martinez [mailto:Brian(_dot_)Martinez(_at_)vercuity(_dot_)com]
Sent: 14 November 2006 22:10
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Character references and the dreaded d-o-e

I have what I think is a very simple XSLT 1 question, but I
can't recall the best way to solve it.

We have the following value in the database: AT&T

Which gets serialized as

<result_set>
  <vendor_name>AT&amp;T</vendor_name>
</result_set>

My stylesheet is set to output text, and doing

<xsl:value-of select="/result_set/vendor_name"/>

Returns AT&amp;T

Even though I'm producing plain text, the only workaround I'm
aware of is to change the output to XML and use d-o-e on the
value-of element to get the desired result (AT&T).  But I
can't help but think there are unwanted side effects to this,
and that there might be a better way (perhaps using string
replacement?).  Any other suggestions?

Thanks,
b.

Brian Martinez
Engineer/Developer
Vercuity
5889 Greenwood Plaza Blvd., Ste 300
Greenwood Village, CO  80111
303.218.5246 office
303.218.5301 fax
720.233.4966 mobile
http://www.vercuity.com



--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>