|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Unexpected token syntax error, unexpected DeclareFunction_Anil Shekhar anilshekhar at hotmail.comWed Sep 30 19:13:51 PDT 2009
Dear Experts,
I am new to XQuery and I need your help. I am getting the following error when accessed ...
http://127.0.0.1:8010/shakespeare.xqy
500 Internal Server Error
XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected DeclareFunction_
in /shakespeare.xqy, on line 8 [1.0-ml]
Line 8 is where I have defined the function.
Thanks
Anil
<html>
<head>
<title>Shakespeare ...</title>
</head>
<body>
<p>
{
declare function local:handle-doc(
$doc as document-node(),
$speeches as element(SPEECH)+
)
{
<h1>{ document-uri($doc) }</h1>,
for $speech in $speeches
let $speaker := $speech/SPEAKER
let $lines := $speech/LINE
return (
<h3>{ $speaker/text() }</h3>,
<p>{ $lines/text() }</p>
)
};
for $d in doc("file:///C:/Users/ashekhar/Desktop/Mark Logic/Shakespeare/*.xml")
order by $d ascending
return local:handle-doc($d, $d//SPEECH)
}
</p>
</body>
</html>)
_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090930/246e6c1b/attachment.htm
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






