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

RE: unwelcome SPAN in text output

Subject: RE: unwelcome SPAN in text output
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Tue, 29 Apr 2003 18:28:02 -0400
xslt xmlns output
[Arthur Allen]

> Thanks for your help. I'm new to this list, and also to XSLT
> (what a struggle, even aided by Michael's excellent book).
> 
> I've assembled all the pieces this time:
> 
> * input sample (no SPAN elements that I can detect, very short)
> * stylesheet (with text output mode set)
> * the output loaded with SPAN.
> 
> I'm flumoxed. I have noticed that the processor ignores
> my newline instruction <xsl:text>
> </xsl:text>
> 
> The complete output:
> 
> <SPAN S_='07381AA8 13'>usfr-gc_GeneralConcepts</SPAN><SPAN 
> S_='07381AA8 
> 14'>	</SPAN><SPAN S_='07381AA8 15'>1</SPAN><SPAN S_='07381AA8 
> 16'>	</SPAN><SPAN S_='07381AA8 17'>1</SPAN><SPAN S_='07381AA8 
> 18'>	</SPAN><SPAN S_='07381AA8 1C'>
> </SPAN></S__>
> 
> 

Well, using the xml source and the stylesheet you included in your last
post, I get a completely different output, namely just this -

usfr-gc_GeneralConcepts	1	1

That's it!  Either you sent us the wrong versions, or your system is
adding lots of stuff to either the source or the output after the xslt
transformation.  It looks like you have a production system that is
trying to format something according to some rules you know nothing
about.

You better say how you ran the transformation.  I used XML Cooktop, and
got the same results with both msxml4 and with Saxon 6.5.2.  And if you
are not doing so already, you had best start running the transforms from
the command line or from a simple tool until you have confidence that
you know how to get what you want.  Then you can tackle the rest of your
system.

If you do not need all those namespaces in the source and stylesheet, I
would get rid of them, BTW.

Cheers,

Tom P

> The style sheet is:
> 
> <?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:presentationTree/taxo:show"/>
> 	</xsl:template>
> 	<xsl:template match="taxo:show">
> 			<xsl:variable name="parentID" 
> select="ancestor::taxo:show[1]/@taxo:name"/>
> 
> 			<!--emit ID, position, depth, parent ID tuple-->
> 			<xsl:value-of select="@taxo:name"/>
> 			<xsl:text>	</xsl:text>
> 			<xsl:value-of select="@taxo:index"/>
> 			<xsl:text>	</xsl:text>
> 			<xsl:value-of select="@taxo:depth"/>
> 			<xsl:text>	</xsl:text>
> 			<xsl:if test="$parentID">
> 				<xsl:value-of select="$parentID"/>
> 			</xsl:if>
> 			<xsl:text>
> </xsl:text>
> 			<xsl:apply-templates select="taxo:show"/>
> 	</xsl:template>
> </xsl:stylesheet>
> 
> 
> and the input is
> 
> <?xml version='1.0' ?>
> <taxo:presentationTree xmlns:msxsl="urn:schemas-microsoft-com:xslt" 
> xmlns:xlink="http://www.w3.org/1999/xlink" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> xmlns:link="http://www.xbrl.org/2001/XLink/xbrllinkbase" 
> xmlns:taxo="urn:taxonomy-analysis:xslt" 
> xmlns:saxon="http://icl.com/saxon" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <taxo:show auto-ns1:name="usfr-gc_GeneralConcepts" 
> xmlns:auto-ns1="urn:taxonomy-analysis:xslt" auto-ns1:index="1" 
> auto-ns1:depth="1"><taxo:label xml:lang="en">US GAAP - Commercial and 
> Industrial</taxo:label></taxo:show></taxo:presentationTree>
> 

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


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.