|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Extra newline remove on text nodes
Subject: Re: Extra newline remove on text nodes
From: Brendan Benke <bbenke@xxxxxxxxx>
Date: Mon, 11 Apr 2005 18:39:40 -0400
|
yes, that removes ALL newlines. I would like to preserve the original
newlines while not adding the extra two. If you look at the source xml
and see the url encoded string, it has single %0D%0A newlines that
somehow get tripled on final output. I've tried replacing the three
newlines with a single but I can't get it to work.
Bondarenko, Taras wrote:
Did you tried using normalize-space() function?
-----Original Message-----
From: Brendan Benke [mailto:bbenke@xxxxxxxxx]
Sent: Monday, April 11, 2005 4:16 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Extra newline remove on text nodes
I can't seem to find an answer to this or a solution that will work.
I need to remove extra but not all newline (CRLF) from a text node
after a url decode. I've tried replace string functions where I
replace 3 CRLF with one. That doesn't seem to work.
How can I prevent the extra newlines (CRLF) from appearing without
removing them all with normalize-space().
I need the IBIF_adhocfex value to be:
<input type="hidden" name="IBIF_adhocfex" value="TABLE FILE CAR
PRINT CAR MODEL BY
COUNTRY WHERE COUNTRY EQ '&CNTY'
END"/>
Where it is currently:
<input type="hidden" name="IBIF_adhocfex" value="TABLE FILE CAR
PRINT CAR MODEL BY
COUNTRY WHERE COUNTRY EQ '&CNTY'
END"/>
INPUT XML:
------------------
<?xml version="1.0" ?>
<wfdescribe>
<!-- Created by WebFOCUS -->
<binding-info>
<SUBSYSTEM>Self Service</SUBSYSTEM>
<SERVER_PROTOCOL>HTTP/1.1</SERVER_PROTOCOL>
<SERVER_NAME>localhost</SERVER_NAME>
<SERVER_PORT>8080</SERVER_PORT>
<SCRIPT_NAME>%2Fibi_apps%2FWFServlet</SCRIPT_NAME>
<URL_PROTOCOL>http</URL_PROTOCOL>
<FOCHTMLURL>%2Fibi_html</FOCHTMLURL>
<FOCEXURL>%2Fibi_apps%2FWFServlet%3FIBIF_webapp%3D%2Fibi_apps%26IBIC_ser
ver%3DEDASERVE%26%3D%26</FOCEXURL>
<externalXSL_bool isReqParm="yes">on</externalXSL_bool>
<IBIF_wfdescribe isReqParm="yes">XML</IBIF_wfdescribe>
<IBIC_server isReqParm="yes">EDASERVE</IBIC_server>
<RunAdHoc isReqParm="yes">Submit</RunAdHoc>
<IBIF_adhocfex
isReqParm="yes">TABLE+FILE+CAR+%0D%0APRINT+CAR+MODEL+BY+%0D%0ACOUNTRY+WH
ERE+COUNTRY+EQ+%27%26CNTY%27+%0D%0AEND</IBIF_adhocfex>
<wfdescribe_bool isReqParm="yes">on</wfdescribe_bool>
<adhoc_bool isReqParm="yes">on</adhoc_bool>
</binding-info>
<sysfex focexec="_ADHOCRQ">
<amper name="FOCEXURL" type="set" />
<amper name="FOCHTMLURL" type="set" />
<amper name="FOCREL" type="parm" />
<amper name="RunAdHoc" type="set" />
<amper name="wfdescribe_bool" type="set" />
<amper name="externalXSL_bool" type="set" />
<amper name="adhoc_bool" type="set" />
<amper name="CNTY" type="unresolved" />
<amper name="EXP" type="set" />
</sysfex>
</wfdescribe>
PORTION OF TEMPLATE:
----------------------------------------
<xsl:template name="InvokationBinding" match="binding-info" >
<xsl:for-each select="*[@isReqParm='yes']" >
<xsl:element name='input'>
<xsl:attribute name='type'>hidden</xsl:attribute>
<xsl:attribute name='name'>
<xsl:value-of disable-output-escaping="yes"
select="urldecoder:decode(name())"/>
</xsl:attribute>
<xsl:attribute name='value'>
<xsl:value-of disable-output-escaping="yes"
select="urldecoder:decode(text())"/>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:template>
OUTPUTTED HTML (PORTION):
-------------------------------------------------
<input type="hidden" name="externalXSL_bool" value="on"/>
<input type="hidden" name="IBIF_wfdescribe" value="XML"/>
<input type="hidden" name="IBIC_server" value="EDASERVE"/>
<input type="hidden" name="RunAdHoc" value="Submit"/>
<input type="hidden" name="IBIF_adhocfex" value="TABLE FILE CAR
PRINT CAR MODEL BY
COUNTRY WHERE COUNTRY EQ '&CNTY'
END"/>
<input type="hidden" name="wfdescribe_bool" value="on"/>
<input type="hidden" name="adhoc_bool" value="on"/>
-------------------------------------------

|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|