[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Concat function returning nodeset when param is pa

Subject: Re: Concat function returning nodeset when param is part of arguments
From: George Cristian Bina <george@xxxxxxxxxxxxx>
Date: Sat, 17 Oct 2009 00:22:16 +0300
Re:  Concat function returning nodeset when param is pa
Hi,

This Saxon fix was integrated in the latest oXygen 11 build, 2009101512.
So just get the 2009101512 build from our download page and you will have this issue fixed:
http://www.oxygenxml.com/download_oxygenxml_editor.html


Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Michael Kay wrote:
Known bug: see
https://sourceforge.net/tracker/?func=detail&aid=2878207&group_id=29872&atid
=397617

Please note, if something stops working with a new release of a product,
then it's very likely to be a bug, and as such it should be reported first
on the forum for that product, not here on xsl-list. Both the Saxon and
oXygen lists are very responsive to problem reports.

Regards,

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




-----Original Message-----
From: Alex Muir [mailto:alex.g.muir@xxxxxxxxx] Sent: 16 October 2009 14:28
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Concat function returning nodeset when param is part of arguments


Hi,

Running my code in version 11 of oxygen I'm getting the following error on the matches function in the when test in the code below

Severity: error
Description: Attempting to access a sequence as a singleton item


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0"> ...
<xsl:param name="regex_string_tags" as="xs:string" select="'\[\[B\]\]'"/> ...
<xsl:variable name="matchingString" as="xs:string"
select="concat('^',$regex_string_tags,'(##[^#]+?##|\s)*?\[\[FONT')"/>
...
<xsl:when test="matches(.,$matchingString,$regex_flags)">



In the debugger it is stating that the variable matchingString is a nodeset(5) rather than the string I would have expected.

I noticed that if I remove the parameter from the concat statement and replace it with 'some string' it then returns a string as I expect also if I change the param into a variable it returns a string.

<xsl:variable name="matchingString" as="xs:string"
select="concat('^','some string','(##[^#]+?##|\s)*?\[\[FONT')"/>

So why is the parameter having this effect?

I suppose I could have made a change I didn't notice however this was working in version 10.3 of oxygen.

Thanks



--

Alex
https://sites.google.com/a/utg.edu.gm/alex

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.