RE: [xsl] problem with d-o-e in attribute

Subject: RE: [xsl] problem with d-o-e in attribute
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 26 Apr 2004 10:40:01 +0100
It's part of the definition of d-o-e that it only works when you are
creating text nodes, not when you are creating other kinds of nodes such as
attributes.

IIRC, Saxon 6.5.3 has an extension saxon:disable-output-escaping that allows
you to d-o-e for attribute nodes.

Michael Kay 

> -----Original Message-----
> From: Philippe Drix [mailto:pdrix@xxxxxxxxxxxx] 
> Sent: 24 April 2004 13:01
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] problem with d-o-e in attribute
> 
> 
> Hi!
> 
> I am working on XSL Transformations to generate XML 
> OpenOffice.org files, 
> namely content.xml and styles.xml.
> I am puzzled by a bug I cant work around by pure XSLT code.
> 
> Here the problem :
> 
> <?xml version='1.0' encoding="iso-8859-1"?>
> <xsl:stylesheet 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";  version="1.0">
> 
> <xsl:template match="/">
>          <foo>
>                  <xsl:attribute name="bar">
>                          <xsl:text 
> disable-output-escaping="yes">&amp;apos;bar&amp;apos;</xsl:text>
>                  </xsl:attribute>
>          </foo>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> 
> What I gain :
> <?xml version="1.0" encoding="utf-8"?>
> <foo bar="&amp;apos;bar&amp;apos;"/>
> 
> 
> What I want :
> <?xml version="1.0" encoding="utf-8"?>
> <foo bar="&apos;bar&apos;"/>
> 
> I use Saxon 6.5.3
> 
> Any idea ?
> Regards -- PhD
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> Philippe Drix
> Consultant Sinior
> 
> http://www.objectiva.fr
> 21-23, rue Aristide Briand - 92170 Vanves
> tel : +33 1 47 36 60 30
> cel :    06 74 78 34 97
> fax : +33 1 47 36 61 93

Current Thread