[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.com
Wed Sep 30 19:13:51 PDT 2009


  Unexpected token syntax error
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!

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-2011 All Rights Reserved.