xsl-list
[Top] [All Lists]

RE: unwelcome SPAN in text output

2003-04-26 04:31:44
I can only assume that the SPAN "elements" were there in your source
data, which you haven't shown us.

I say "elements" in quotes because they aren't really elements, they are
just text containing angle brackets which makes them look like elements.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Arthur Allen
Sent: 26 April 2003 00:35
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] unwelcome SPAN in text output


I've been trying to prepare a tab-and-newline-delimited load 
file for mysql, and am finding my output file cluttered with 
unwanted <SPAN> elements! It looks to me like I am in a 
twilight zone between text & HTML.

E.g., instead of

usfr-gc_GeneralConcepts       en      "US GAAP - Commercial 
and Industrial"
int-ar_AccountantsReport      en      "Accountants Report"

I get the following, which BTW looks ok on the screen:

<SPAN S_='02493EA0 12'>usfr-gc_GeneralConcepts</SPAN><SPAN 
S_='02493EA0 
13'>  </SPAN><SPAN S_='02493EA0 14'>en</SPAN><SPAN S_='02493EA0 
15'>  </SPAN><SPAN S_='02493EA0 16'>"</SPAN><SPAN 
S_='02493EA0 17'>US GAAP - 
Commercial and Industrial</SPAN>

This happens regardless of whether I use Saxon (6.5.2) or the 
processor native to Stylus Studio, but not using MSXML3.0.

My code runs as follows...
<?xml version='1.0'?>

<xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform";

      xmlns:taxo="urn:taxonomy-analysis:xslt"
      xmlns:saxon="http://icl.com/saxon";
      xmlns:msxsl="urn:schemas-microsoft-com:xslt"
      >
      <xsl:output method="text" encoding="UTF-8" indent="no"/>

      <xsl:template match="/">
              <xsl:apply-templates 
select="taxo:all/taxo:itemTable/taxo:item/taxo:label"/>
      </xsl:template>
      <xsl:template match="taxo:label">
              <xsl:variable name="ID" 
select="parent::taxo:item/@taxo:name"/>
              <!--emit ID,language,label tuple-->
                      <xsl:value-of select="$ID"/>
                      <xsl:text>&#x9;</xsl:text>
                      <xsl:value-of select="@xml:lang"/>
                      <xsl:text>&#x9;</xsl:text>
                      <xsl:text>&quot;</xsl:text>
                      <xsl:value-of select="."/>
                      <xsl:text>&quot;</xsl:text>
                      <xsl:text>&#xa;</xsl:text>
      </xsl:template>
</xsl:stylesheet>

Thanks for your attention,
Arthur Allen


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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