I have the following (simplified) code
test.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<Root PathName="C:\Test Dir\">
<Note id="Id1"/>
</Root>

test.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="/">
 <xsl:apply-templates />
</xsl:template>
<xsl:template match="Root">
 <HTML>
  <head><title>Header</title></head>
  <BODY>
   <xsl:value-of select="/Root/@PathName"/><br/>tes
   <xsl:apply-templates select="Note"/>
  </BODY>
 </HTML>
</xsl:template>
<xsl:template match="Note">
 <img>
  <xsl:attribute name="width">415</xsl:attribute>
  <xsl:attribute name="height">10</xsl:attribute>
  <xsl:attribute name="src"><xsl:value-of
select="/Root/@PathName"/>images/myImage.gif</xsl:attribute>
 </img>
 <xsl:value-of select="@id"/><br/>
</xsl:template>
</xsl:stylesheet>

This works using IE (using 7 and just opening the xml in the browser)
and xalan. However, using xsltproc (and, internally, in our code with
making the actual api calls), this produces a mangled 'src' attribute.
 
Using xalan:
<HTML>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Header</title>
</head>
<BODY>C:\Test Dir\<br>tes
   <img width="415" height="10" src="C:\Test
Dir\images/myImage.gif">Id1<br>
</BODY>
</HTML>

Using xsltproc:
<HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Header</title>
</head>
<BODY>C:\Test Dir\<br>tes
   <img width="415" height="10"
src="C:%5CTest%20Dir%5Cimages/myImage.gif">Id1<br>
</BODY>
</HTML>

Are there any work arounds to this? (I'm not the xsl programmer - I
wrote the C++ code to do the transformations)
 
Thanks,
Dave Connet
 
_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
http://mail.gnome.org/mailman/listinfo/xslt

Reply via email to