This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XML-to-XML question
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] XML-to-XML question
- From: Wolfgang Bogacz <wbogacz at omicron dot com>
- Date: Mon, 26 Feb 2001 14:24:09 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
I've been fairly successful having my transformations write out into HTML
files through XT
so I can validate the output, but now i'd like to change my output mode to
XML.
This yields alot of character problems right from the start.
This is the starting part of the incoming file:
<?xml version="1.0"?>
<svg width="100%" height="100%" viewBox="0 0 1264 857" style="fill:teal">
This is my starting module:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:include href="g.xsl"/>
...more includes...
<xsl:include href="tokenize_styles.xsl"/>
<xsl:output method="xml" indent="no"/>
<xsl:template match="svg">
< svg
<xsl:if test="string-length(normalize-space(@style)) != 0">
<xsl:call-template name="tokenize_styles">
<xsl:with-param name="parse-string"
select="concat(normalize-space(translate(@style,'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
,'abcdefghijklmnopqrstuvwxyz')),';')"/>
<xsl:with-param name="symbol-string" select="'svg'"/>
</xsl:call-template>
</xsl:if>
>
<xsl:apply-templates/>
</svg>
</xsl:template>
</xsl:stylesheet>
When this was output as "html" I would get something like <svg
width="100%" height="100%" viewBox="0 0 1264 857" fill="teal">
which would show as <svg width="100%" height="100%" viewBox="0 0 1264 857"
fill="teal">, so I was happy.
However, now my transform for xml kills me right after the template match,
though I've tried embedding the
< and > within concat statements, such as: <xsl:value-of
select="concat(<,'svg ')"/> or <xsl:value-of
select="concat(<,'/svg',>)"/> for the last.
Am I far off? I seem to have trouble getting the foot in the door.
Thanks for any help.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list