On 31 October 2012 19:52, <[email protected]> wrote:
> Send General mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://developer.marklogic.com/mailman/listinfo/general > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of General digest..." > > Today's Topics: > > 1. Re: Extending error handling (Geert Josten) > 2. Re: Extending error handling (Will Thompson) > 3. Preserve space in xdmp:tidy (Mihir Das) > 4. Re: Preserve space in xdmp:tidy (Mihir Das) > 5. Re: Extending error handling (Geert Josten) > 6. Path index with namespace in an serialized cts:query node > (Pascal Cadet) > > > ---------- Forwarded message ---------- > From: Geert Josten <[email protected]> > To: MarkLogic Developer Discussion <[email protected]> > Cc: > Date: Tue, 30 Oct 2012 21:57:30 +0100 > Subject: Re: [MarkLogic Dev General] Extending error handling > Hi Will, > > The default behavior is as far as I know indeed built-in. At least, never > saw a module that seemed to implement the built-in behavior. But perhaps > you don't need to reference it from XQuery. I think that any error raised > in a custom error handler is caught by the built-in one. So, don't write > output, but always raise a new error through fn:error. You might need to > fiddle a bit to find a way to pass through exceptions 'untouched' if you > would like to.. > > Kind regards, > Geert > > > -----Oorspronkelijk bericht----- > > Van: [email protected] [mailto:general- > > [email protected]] Namens Will Thompson > > Verzonden: dinsdag 30 oktober 2012 18:20 > > Aan: MarkLogic Developer Discussion > > Onderwerp: [MarkLogic Dev General] Extending error handling > > > > I want to extend the functionality of the existing HTTP error handler, > but not > > necessarily replace it. I thought at the very least I could make a copy > of the > > existing error handler, add my extensions, and point the App Server > there, but I > > can't seem to find the right XQY module. Is the default error handler > part of the > > executable, not XQY? > > > > -Will > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > > > > ---------- Forwarded message ---------- > From: Will Thompson <[email protected]> > To: MarkLogic Developer Discussion <[email protected]> > Cc: > Date: Tue, 30 Oct 2012 21:41:33 +0000 > Subject: Re: [MarkLogic Dev General] Extending error handling > Thanks Geert. This is ideally what I'd like to do, but there doesn't seem > to be a way to pass the context of the current exception back to error(). > It is possible to get the error code, name, and description and then > rethrow. In this case it will raise the error from the error handler > context. > > Then it's smart enough to print out "Old Error" followed by a > pretty-printed xdmp:quote() of the $error:error variable. That's partially > useful, but it's not clear to me how to wire it so that it rethrows using > the context of $error:error. As it is, it would be very hard to read the > error details through sea of XML. > > For now, I have just been trying to reverse engineer current error > handler, followed by my updates. > > -Will > > > -----Original Message----- > From: [email protected] [mailto: > [email protected]] On Behalf Of Geert Josten > Sent: Tuesday, October 30, 2012 1:58 PM > To: MarkLogic Developer Discussion > Subject: Re: [MarkLogic Dev General] Extending error handling > > Hi Will, > > The default behavior is as far as I know indeed built-in. At least, never > saw a module that seemed to implement the built-in behavior. But perhaps > you don't need to reference it from XQuery. I think that any error raised > in a custom error handler is caught by the built-in one. So, don't write > output, but always raise a new error through fn:error. You might need to > fiddle a bit to find a way to pass through exceptions 'untouched' if you > would like to.. > > Kind regards, > Geert > > > -----Oorspronkelijk bericht----- > > Van: [email protected] [mailto:general- > > [email protected]] Namens Will Thompson > > Verzonden: dinsdag 30 oktober 2012 18:20 > > Aan: MarkLogic Developer Discussion > > Onderwerp: [MarkLogic Dev General] Extending error handling > > > > I want to extend the functionality of the existing HTTP error handler, > but not > > necessarily replace it. I thought at the very least I could make a > > copy > of the > > existing error handler, add my extensions, and point the App Server > there, but I > > can't seem to find the right XQY module. Is the default error handler > part of the > > executable, not XQY? > > > > -Will > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > Hi Mihir, > > Try this: > > xdmp:tidy( '<doc xml:space="preserve"><a>MarkLogic</a> is rocking</doc>' , > <options > xmlns="xdmp:tidy"> > > <input-xml>true</input-xml> > </options>) > > Regards > Amit > > ---------- Forwarded message ---------- > From: Mihir Das <[email protected]> > To: [email protected] > Cc: > Date: Wed, 31 Oct 2012 11:22:44 +0800 > Subject: [MarkLogic Dev General] Preserve space in xdmp:tidy > > Hi All, > > Can anyone tell me how to preserve space after node closure in xdmp:tidy? > > e.g: > > xdmp:tidy( "<doc><a>MarkLogic</a*> i*s rocking</doc>" , > <options > xmlns="xdmp:tidy"> > > <input-xml>true</input-xml> > </options>) > > Output: > > <status xmlns="xdmp:tidy"> > <message>No warnings or errors were found. > > </message> > </status> > <?xml version="1.0" encoding="UTF-8"?> > <doc> > <a>MarkLogic</a*>i*s rocking</doc> > > > Expected: > > <doc> > <a>MarkLogic</a*> i*s rocking</doc> > > > Thanks in advance! > Mihir > > > > ---------- Forwarded message ---------- > From: Mihir Das <[email protected]> > To: [email protected] > Cc: > Date: Wed, 31 Oct 2012 11:56:19 +0800 > Subject: Re: [MarkLogic Dev General] Preserve space in xdmp:tidy > To add on this, if we use the string inside <pre> tag and option > <add-xml-space> > then will it still validate the document for well-formed and clean XHTML? > > Thanks, > Mihir > > On Wed, Oct 31, 2012 at 11:22 AM, Mihir Das <[email protected]>wrote: > >> >> Hi All, >> >> Can anyone tell me how to preserve space after node closure in xdmp:tidy? >> >> e.g: >> >> xdmp:tidy( "<doc><a>MarkLogic</a*> i*s rocking</doc>" , >> <options >> xmlns="xdmp:tidy"> >> >> <input-xml>true</input-xml> >> </options>) >> >> Output: >> >> <status xmlns="xdmp:tidy"> >> <message>No warnings or errors were found. >> >> </message> >> </status> >> <?xml version="1.0" encoding="UTF-8"?> >> <doc> >> <a>MarkLogic</a*>i*s rocking</doc> >> >> >> Expected: >> >> <doc> >> <a>MarkLogic</a*> i*s rocking</doc> >> >> >> Thanks in advance! >> Mihir >> >> > > > ---------- Forwarded message ---------- > From: Geert Josten <[email protected]> > To: MarkLogic Developer Discussion <[email protected]> > Cc: > Date: Wed, 31 Oct 2012 07:54:28 +0100 > Subject: Re: [MarkLogic Dev General] Extending error handling > Hi Will, > > There are some other error-handlers that might be worth looking at. Most > notably the one from Query Console. It's not an isolated error handlers, > but the eval.xqy endpoint contains some functions that might interest > you.. > > Cheers, > Geert > > > -----Oorspronkelijk bericht----- > > Van: [email protected] [mailto:general- > > [email protected]] Namens Will Thompson > > Verzonden: dinsdag 30 oktober 2012 22:42 > > Aan: MarkLogic Developer Discussion > > Onderwerp: Re: [MarkLogic Dev General] Extending error handling > > > > Thanks Geert. This is ideally what I'd like to do, but there doesn't > seem to be a > > way to pass the context of the current exception back to error(). It is > possible to > > get the error code, name, and description and then rethrow. In this case > it will > > raise the error from the error handler context. > > > > Then it's smart enough to print out "Old Error" followed by a > pretty-printed > > xdmp:quote() of the $error:error variable. That's partially useful, but > it's not > > clear to me how to wire it so that it rethrows using the context of > $error:error. > > As it is, it would be very hard to read the error details through sea of > XML. > > > > For now, I have just been trying to reverse engineer current error > handler, > > followed by my updates. > > > > -Will > > > > > > -----Original Message----- > > From: [email protected] [mailto:general- > > [email protected]] On Behalf Of Geert Josten > > Sent: Tuesday, October 30, 2012 1:58 PM > > To: MarkLogic Developer Discussion > > Subject: Re: [MarkLogic Dev General] Extending error handling > > > > Hi Will, > > > > The default behavior is as far as I know indeed built-in. At least, > never saw a > > module that seemed to implement the built-in behavior. But perhaps you > don't > > need to reference it from XQuery. I think that any error raised in a > custom error > > handler is caught by the built-in one. So, don't write output, but > always raise a > > new error through fn:error. You might need to fiddle a bit to find a way > to pass > > through exceptions 'untouched' if you would like to.. > > > > Kind regards, > > Geert > > > > > -----Oorspronkelijk bericht----- > > > Van: [email protected] [mailto:general- > > > [email protected]] Namens Will Thompson > > > Verzonden: dinsdag 30 oktober 2012 18:20 > > > Aan: MarkLogic Developer Discussion > > > Onderwerp: [MarkLogic Dev General] Extending error handling > > > > > > I want to extend the functionality of the existing HTTP error handler, > > but not > > > necessarily replace it. I thought at the very least I could make a > > > copy > > of the > > > existing error handler, add my extensions, and point the App Server > > there, but I > > > can't seem to find the right XQY module. Is the default error handler > > part of the > > > executable, not XQY? > > > > > > -Will > > > _______________________________________________ > > > General mailing list > > > [email protected] > > > http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > > > > ---------- Forwarded message ---------- > From: Pascal Cadet <[email protected]> > To: MarkLogic MailingList <[email protected]> > Cc: > Date: Wed, 31 Oct 2012 15:22:34 +0100 > Subject: [MarkLogic Dev General] Path index with namespace in an > serialized cts:query node > Hi ! > > How can I use index path namespace in an serialized cts:query node ? > > *search:estimate* ( > <cts:path-range-query *operator* =*"="* > > <cts:path *xmlns* =*" > http://marklogic.com/appservices/search"* *xmlns:my* =*" > http://my_namespace"*> /my:root/my:elt[@att="val"]</cts:path> > <cts:value *xsi:type* =*"xs:string"* *xmlns:xsi* =*" > http://www.w3.org/2001/XMLSchema-instance"* >search</cts:value> > </cts:path-range-query> > ) > > Result : > [1.0-ml] XDMP-UNBPRFX: (err:XPST0081) Prefix my has no namespace binding > > > Any idea ? > > Thanks > > Pascal > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > -- Regards Amit
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
