XT and Text Nodes

Subject: XT and Text Nodes
From: "Bloebaum, Amy M." <Amy.M.Bloebaum@xxxxxxxxxxxxxxx>
Date: Fri, 29 Jan 1999 09:29:41 -0500
I am attempting to eliminate all occurrences of the sequence <p><FS/></p>
from the XML document below.    

<?xml version="1.0" standalone="yes"?>
<info><p><FS/></p><p>This is<FS/> a test.</p></info>

If the <p> element contains any text, I want to preserve the element in the
result tree. 
>From the XSL spec, I would expect 'Foo' to be a text node in the XML
document tree and a child of element 'p'.
However, given the following style sheet, XT drops all three paragraph
elements from the result tree.   
Is this a problem with XT or did I miss something in the tree construction
process description?   Is there a better way to do this?

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";

<xsl:template match="doc">

<xsl:template match="FS">

<xsl:template match="*/p">
    <!-- Match when Forced Space FS is only child of paragraph element -->
    <xsl:when test="./FS[first-of-any() and last-of-any()]">


Amy Bloebaum
Consulting Software Engineer
+1 937 865 6800

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

Current Thread