XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
- XQuery Help and Discussion (2017)
-> + Sample XQuery extension using ... (2)
-> + Another EDI problem (7)
-> + Removing xmls:od and xmls:xsi ... (2)
-> + Configuring MarkLogic with Sty... (10)
-> + EDI to XML (7)
-> + Can't write to SQL-Server (4)
-> + XQuery and SQL-Server (2)
-> + Connection to MS SQL Server in... (2)
-> + copy/modify with Stylus Studio... (5)
-> - copy/modify with Stylus Studio... (1)
-> + [SQLServer JDBC Driver]Value c... (5)
-> + wild card chracter usage in XS... (2)
-> + Xquery with SQL NEWID function (4)
-> + Change Only One Line (5)
-> + Format DB xQuery results (3)
-> + Adding MsSQL Database to XQuer... (3)
-> + Need help with using XQuery in... (2)
-> + please help! simple XML transf... (2)
-> + xquery for invoice data (3)
-> + Xquery to cross reference two ... (3)
-- Previous [121-140] [141-160] [161-180] Next
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Posttop
Ethan SteinSubject: copy/modify with Stylus Studio 2007 R2
Author: Ethan Stein
Date: 12 May 2009 08:38 PM
Originally Posted: 12 May 2009 08:28 PM
Has the copy/modify/replace value of functions changed between Stylus Studio 2007 R2 and Stylus Studio 2008R2/2009?

If so, what was the original implementation? The reason I ask is that apparently in SS2007R2, the following does not work:

<ExtractData>
{
for $CurrentYearPlan in $xPRSXMLInput/ExtractData/CurrentYearPlan
return
copy $CYPlan := $CurrentYearPlan
modify
(
for $planName in $CYPlan/*[contains(upper-case(local-name()),"PLANNAME")]
return
replace value of node $planName with local:transformPlanName($planName/text())
) return $CYPlan
}
</ExtractData>

I'm hoping someone can tell me what has changed so I can modify my xquery accordingly.

Just to clarify,

In 2008R2/2009, the following works:

copy $CYPlan := $CurrentYearPlan
modify
...

However, in 2007R2, you must use:

let $CYPlan := copy($CurrentYearPlan)
return
modify
...


Thanks.

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.