Thank you, Michael and Liam, for pointing out the redundancy of my ways. My
XSLT is now leaner and cleaner.
--Jack
LSI, Inc.
Jacksonville, FL
From: Michael Kay mike(_at_)saxonica(_dot_)com
[mailto:xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com]
Sent: Wednesday, May 14, 2014 3:14 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] WARNING org.xml.sax.SAXParseException: The child axis
starting at a text node will never select anything
On 13 May 2014, at 20:15, Kulas, Jack
jkulas(_at_)lsijax(_dot_)com<mailto:jkulas(_at_)lsijax(_dot_)com>
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com<mailto:xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>>
wrote:
I was getting the following warning when I'd run a transformation within
Arbortext Editor 6.1-F000, which uses the Saxon 9.1.0.5 XSLT transformation
engine:
WARNING org.xml.sax.SAXParseException: The child axis starting at a text node
will never select anything
When I replaced this template
<xsl:template match="text()" mode="func">
<xsl:value-of select="."/>
<xsl:apply-templates mode="func"/>
</xsl:template>
The apply-templates is a no-op; it processes the children of the text node, and
there can never be any. If you remove the apply-templates, you get
<xsl:template match="text()" mode="func">
<xsl:value-of select="."/>
</xsl:template>
Which is the default template for text nodes, so it does no harm to delete the
whole thing,
with this one
<xsl:template match="*" mode="func">
<xsl:apply-templates mode="func"/>
</xsl:template>
This template rule does nothing useful because it's the default template for
element nodes.
So you've deleted one redundant template rule and added another redundant
template rule, and the net effect, unsurprisingly, is that your code still
works.
Michael Kay
Saxonica
XSL-List info and
archive<https://urldefense.proofpoint.com/v1/url?u=http://www.mulberrytech.com/xsl/xsl-list&k=1ZU599FLFekg6yTg9glAMA%3D%3D%0A&r=xX%2FwkipxxaHGqtTJDLO%2BoxCOlF94J%2FYibccxb6EbuF4%3D%0A&m=K9UYidp1MCZZAkU36bgTBkPMsuWOUzvyNLfPq9hrK3M%3D%0A&s=43e2110b696c77c664abe005a5f3d38b571a6c591502e81d007f001d393f8173>
EasyUnsubscribe<https://urldefense.proofpoint.com/v1/url?u=-list/567736&k=1ZU599FLFekg6yTg9glAMA%3D%3D%0A&r=xX%2FwkipxxaHGqtTJDLO%2BoxCOlF94J%2FYibccxb6EbuF4%3D%0A&m=K9UYidp1MCZZAkU36bgTBkPMsuWOUzvyNLfPq9hrK3M%3D%0A&s=779d42a6ea82af990ace2916ca6bafb71541bc6aa2990a166846535b4d0b1044>
(by email<>)
----------------------------------------------------------------------
Disclaimer - This email and any files transmitted with it are proprietary and
may contain privileged or copyright information. You must not present this
message to another party without gaining permission from the sender. If you are
not the intended recipient you must not copy, distribute or use this email or
the information contained in it for any purpose other than to notify us. If you
have received this message in error, please notify the sender immediately, and
delete this email from your system. We do not guarantee that this material is
free from viruses or any other defects although due care has been taken to
minimize the risk. Any views expressed in this message are those of the
individual sender, except where the sender specifically states them to be the
views of LSI.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--