Subject: Re: [xsl] Could not select the text() of both parent & child nodes simultaneously From: Michael Kay <mike@xxxxxxxxxxxx> Date: Wed, 16 Jun 2010 10:19:08 +0100 |
Hi David,
I am very new to XML development, not to mention about XSLT
and hesitates to move to version 2.0 for 3 reasons:
( i ) 1.0 is sufficient for what I need to do but there is bound to be better ways to do it in 2.0.
( ii ) XPath& XSLT 2.0 comes at a cost for recent release of Saxon licensing models.
( iii ) Believes that a schema/DTD is required by the stylesheet. Not familiar with how to set it up yet.
Any how, below is the error I have encountered after having changed the stylesheet version to 2.0 (line 2):Two points here. Firstly, the fact that you've got a type java-type:definition.Sport suggests that you are using Saxon extensions (or extensibility mechanisms) rather than using pure XSLT 1.0 or XSLT 2.0. I wonder if this is really necessary for your application? Perhaps you are escaping into Java only because that's a more familiar world to you than the world of XSLT? If so, let's see if we can find a way to avoid it.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="ns">
.....
Error on line 83
XPTY0004: Cannot compare java-type:definition.Sport to xs:string
Back to the original question, what is the XPath statement in XSLT to get the content of both<a> (team) and<p> (goals) at the sametime?Sorry, I haven't been following the thread that closely.
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Could not select the text, Michael Kay | Thread | [xsl] "XML for the Long Haul" progr, B Tommie Usdin |
Re: [xsl] Could not select the text, David Carlisle | Date | [xsl] XSL Processing to avoid repet, Fabien Tillier |
Month |