Subject: Re: [xsl] Empty String From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 23 Oct 2001 17:03:11 -0400 |
<xsl:template match="String"> <!-- matches elements named 'String' --> <xsl:apply-templates/> <!-- processes the children of the element - - text, other elements, whatever --> <xsl:if test="not(string(.))"> <!-- passes the test if the string content is empty --> <xsl:value-of select="'
'"/> <!-- adds a linefeed character --> </xsl:if> </xsl:template>
Hasta la vista, Wendell
How do i say this using xsl: "xsl, if you find a String element that is empty, please add a text element that contains a paragraph return." I am having trouble matching the empty string.
-- Thanks Muchos,
Greg Martel Coordinator of Enchiladas
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Empty String, Greg Martel | Thread | Re: [xsl] Empty String, Greg Martel |
Re: [xsl] Conversion of int to stri, Thomas B. Passin | Date | Re: [xsl] XML -> HTML beautifier..., Mike Brown |
Month |