xsl-list
[Top] [All Lists]

Re: [xsl] Failing string() test fail

2009-06-26 17:35:41
Update

After additional research on the list, we discovered that the use of
string(node-set) evaluates to the first occurrance of the node in the
set.  So, the appropriate test is just:  node-set//text().
Thanks Wendell, found this:
http://www.stylusstudio.com/xsllist/200412/post30420.html

Karl..


On Fri, Jun 26, 2009 at 8:47 AM, Karl Stubsjoen<kstubs(_at_)gmail(_dot_)com> 
wrote:
OK, this is XSLT 1.0 (I should get in the habit of mentioning that)
The general idea is to display a group heading with child heading and
child detail below each child heading, with the following rules in
place:
1)  only display a group heading if 1 or more child details items occur
2)  only display a child heading if 1 or more child details occur
I'd say the above is typical, well, common anyhow.
I have proven that my context is valid with xsl:comment(s) like <!--
YES I AM HERE -->
I have dummed down the xml (see below) and written similar xpath
expressions, as a sanity check.  So now I am wondering what is it I
could be doing wrong.  I can't freely post the xml and xsl source, as
this is a solution for a client.
I will continue to test and experiment but am afraid that I might have
to resort to a workaround.  The demands on this report are pretty
steep leading up to this point with left to right pivoted groupings
requiring a few recursive template calls, and following::sibling types
of selects.
Is it possible that I have overworked the engine, found a bug?  It
would be my 2nd in about 5 years if I had!
Karl..


On Fri, Jun 26, 2009 at 1:24 AM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:


What would cause a string() test to fail?

Give us some clues:

(a) XSLT 1.0 or 2.0?

(b) By "fail", do you mean "throw an error", or "return false"?

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>