From: Casey J. <cas...@jo...> - 2011-12-21 20:06:45
|
Whatever xquery function that you are returning your serialized string in, is set to accept a node as a return type, and serialize returns a string. So if you have something like declare function local:do-transform() *as node()* { let $trans := transform:transform(....) return util:serialize($trans, "method=xhtml doctype-public=-//W3C//DTD&# 160;XHTML 1.0 Strict//EN doctype-system= http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd") }; It will return that error. Instead: declare function local:do-transform() *as xs:string* { let $trans := transform:transform(....) return util:serialize($trans, "method=xhtml doctype-public=-//W3C//DTD&# 160;XHTML 1.0 Strict//EN doctype-system= http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd") }; Or if you don't exactly know the return type will be constant, just use *as item().* Cheers, Casey On Wed, Dec 21, 2011 at 2:28 PM, kyung88 <gin...@gm...> wrote: > > > the following is the entire page that I got back. > > > <html> > <head><title>XQueryServlet Error</title><link rel="stylesheet" > type="text/css" href="error.css"></link></head> > <body> > <div id="container"> > Error found > FORG0001: xs:string(<div xmlns:lcui="http://www.sft.com/MyApp/UITags" > class="admin_menu" lcui:permission="Use analytics"><br/> <div > class="top_nav_bar"><br/> <div class="top_nav_bar_inner"><br/> > Analytics<br/> <div class="ui-admin-toolbar-img-right > xref"><br/> > /MyApp/web/ui.xql?action=image&resource=icon_userview14.png <br/> > </div><br/> <div class="ui-admin-toolbar-img-right xref" > id="listPanelExpand_Left"><br/> <br/> > /MyApp/web/ui.xql?action=image&resource=icon_list_arrowleft.png <br/> > <br/> </div><br/> </div><br/> </div><br/> <div > class="inner_toc_menu"><br/> <div id="sectionMyReports" > style="display:none;"/><br/> <div id="sectionReports"><br/> > <div class="ui-selectable-header">Usage Reports [lm]<br/> > /MyApp/web/ui.xql?action=image&resource=triangle_up.png <br/> > </div><br/> <ul class="ui-selectable"><br/> <li > class="ui-selectee"><br/> > analytics.xql?action=generate&report=browsers Browser Usage <br/> > </li><br/> <li class="ui-selectee"><br/> > analytics.xql?action=generate&report=visitors_site Site Visitors <br/> > </li><br/> </ul><br/> <div > class="ui-selectable-header">Publication Reports [lm]<br/> > /MyApp/web/ui.xql?action=image&resource=triangle_up.png <br/> > </div><br/> <ul class="ui-selectable"><br/> <li > class="ui-selectee"><br/> > analytics.xql?action=generate&report=visitors_publications Publication > Visitors <br/> </li><br/> </ul><br/> > </div><br/> </div><br/> <div class="main_nav_bars_container"><br/> > <div id="main_nav_bars"><br/> <ul > class="main_nav_bars_list"><br/> <li > class="main_nav_bar"><br/> <ul><br/> > <li id="nav_app_mgmt"><br/> > admin.xql?action=home <br/> > /MyApp/web/ui.xql?action=image&resource=manage_app.png <br/> > Manage Application<br/> <br/> > </li><br/> </ul><br/> </li><br/> > <li class="main_nav_bar"><br/> <ul><br/> > <li id="nav_pubs_mgmt"><br/> > pub.xql?action=admin_home <br/> > /MyApp/web/ui.xql?action=image&resource=manage_pubs.png <br/> > Manage Publications<br/> <br/> > </li><br/> </ul><br/> </li><br/> > <li class="main_nav_bar"><br/> <ul><br/> > <li id="nav_app_dev"><br/> dev.xql?action=home > <br/> > /MyApp/web/ui.xql?action=image&resource=dev_workbench.png <br/> > Developer's Workbench<br/> <br/> > </li><br/> </ul><br/> </li><br/> > <li class="main_nav_bar"><br/> <ul><br/> > <li id="nav_pubs_list"><br/> > pub.xql?action=publist_home <br/> > /MyApp/web/ui.xql?action=image&resource=list_pubs_main.png <br/> > List Publications<br/> <br/> > </li><br/> </ul><br/> </li><br/> > <li class="main_nav_bar"><br/> <ul><br/> > <li id="nav_analytics"><br/> > ui.xql?action=html&resource=analytics_home.html <br/> > /MyApp/web/ui.xql?action=image&resource=list_pubs_main.png <br/> > Analytics<br/> <br/> > </li><br/> </ul><br/> </li><br/> > </ul><br/> </div><br/> </div><br/></div>) is not a sub-type of > node() > <table id="xquerytrace"><caption>XQuery Stack Trace</caption><tr><td > class="func">MyApp-Analytics:view_analytics_menu()</td><td > class="lineinfo">77:17</td></tr></table> > <table id="javatrace"><caption>Java Stack Trace:</caption><tr><th>Class > Name</th><th>Method Name</th><th>File Name</th><th>Line</th></tr><tr><td > class="class">org.exist.xquery.DynamicTypeCheck</td><td > class="method">eval</td><td class="file">DynamicTypeCheck.java</td><td > class="line">132</td></tr><tr><td > class="class">org.exist.xquery.FunctionCall</td><td > class="method">evalFunction</td><td class="file">FunctionCall.java</td><td > class="line">274</td></tr><tr><td > class="class">org.exist.xquery.FunctionCall</td><td > class="method">eval</td><td class="file">FunctionCall.java</td><td > class="line">201</td></tr><tr><td > class="class">org.exist.xquery.AbstractExpression</td><td > class="method">eval</td><td class="file">AbstractExpression.java</td><td > class="line">61</td></tr><tr><td > class="class">org.exist.xquery.PathExpr</td><td class="method">eval</td><td > class="file">PathExpr.java</td><td class="line">241</td></tr><tr><td > class="class">org.exist.xquery.AbstractExpression</td><td > class="method">eval</td><td class="file">AbstractExpression.java</td><td > class="line">61</td></tr><tr><td > class="class">org.exist.xquery.PathExpr</td><td class="method">eval</td><td > class="file">PathExpr.java</td><td class="line">241</td></tr><tr><td > class="class">org.exist.xquery.ConditionalExpression</td><td > class="method">eval</td><td class="file">ConditionalExpression.java</td><td > class="line">100</td></tr><tr><td > class="class">org.exist.xquery.AbstractExpression</td><td > class="method">eval</td><td class="file">AbstractExpression.java</td><td > class="line">61</td></tr><tr><td > class="class">org.exist.xquery.PathExpr</td><td class="method">eval</td><td > class="file">PathExpr.java</td><td class="line">241</td></tr><tr><td > class="class">org.exist.xquery.DebuggableExpression</td><td > class="method">eval</td><td class="file">DebuggableExpression.java</td><td > class="line">56</td></tr><tr><td > class="class">org.exist.xquery.ConditionalExpression</td><td > class="method">eval</td><td class="file">ConditionalExpression.java</td><td > class="line">102</td></tr><tr><td > class="class">org.exist.xquery.AbstractExpression</td><td > class="method">eval</td><td class="file">AbstractExpression.java</td><td > class="line">61</td></tr><tr><td > class="class">org.exist.xquery.PathExpr</td><td class="method">eval</td><td > class="file">PathExpr.java</td><td class="line">241</td></tr><tr><td > class="class">org.exist.xquery.DebuggableExpression</td><td > class="method">eval</td><td class="file">DebuggableExpression.java</td><td > class="line">56</td></tr><tr><td > class="class">org.exist.xquery.ConditionalExpression</td><td > class="method">eval</td><td class="file">ConditionalExpression.java</td><td > class="line">102</td></tr><tr><td > class="class">org.exist.xquery.AbstractExpression</td><td > class="method">eval</td><td class="file">AbstractExpression.java</td><td > class="line">61</td></tr><tr><td > class="class">org.exist.xquery.PathExpr</td><td class="method">eval</td><td > class="file">PathExpr.java</td><td class="line">241</td></tr><tr><td > class="class">org.exist.xquery.DebuggableExpression</td><td > class="method">eval</td><td class="file">DebuggableExpression.java</td><td > class="line">56</td></tr><tr><td > class="class">org.exist.xquery.ConditionalExpression</td><td > class="method">eval</td><td class="file">ConditionalExpression.java</td><td > class="line">102</td></tr></table></div></body></html> > > -- > View this message in context: > http://exist.2174344.n4.nabble.com/Proglem-with-transform-transform-tp4222263p4222921.html > Sent from the exist-open mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > -- -- Casey Jordan easyDITA a product of Jorsek LLC "CaseyDJordan" on LinkedIn, Twitter & Facebook (585) 348 7399 easydita.com This message is intended only for the use of the Addressee(s) and may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, please be advised that any disclosure copying, distribution, or use of the information contained herein is prohibited. If you have received this communication in error, please destroy all copies of the message, whether in electronic or hard copy format, as well as attachments, and immediately contact the sender by replying to this e-mail or by phone. Thank you. |