It would also be useful to see the XML document itself.
Maybe its an ill-formed XML Declaration header that parses like an XML PI ...


-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
[email protected]
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Danny Sokolsky
Sent: Saturday, December 15, 2012 2:50 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] XDMP-BADPINAME: 
xdmp:get-request-body("xml")

Hi Tim,

I believe it is true that since about 4.2 or so, MarkLogic has been more 
spec-compliant with respect to how the xml declaration is handled.  So it is 
not that surprising that some things behave slightly differently.  It sounds 
like whatever code you are running thinks the xml declaration is a processing 
instruction, and that is not allowed.  The XML declaration is just a hint to 
the parser to parse a document as xml.

If you show us a program you are running that is getting this error (rather 
than just showing the error), then maybe we can offer some advise about why you 
are getting the error and how to avoid it.

That being said, here is one thing you might try (if you have not already):  
Have you tried getting the document as text and then using xdmp:unquote to 
parse that text as xml?

-Danny
________________________________________
From: [email protected] 
[[email protected]] on behalf of Tim Meagher 
[[email protected]]
Sent: Friday, December 14, 2012 8:15 PM
To: 'MarkLogic Developer Discussion'
Subject: Re: [MarkLogic Dev General]    XDMP-BADPINAME: 
xdmp:get-request-body("xml")

Well, I tried creating an example using xquery, but trying to add the xml
declaration to a document results in the following documented error after
trying to create the record and not during insert:

        Processing instructions may not have the target 'XML'

So I'm wondering if the XML declaration should never have been allowed in
any documents being created externally for insertion and if MarkLogic
started restricting such documents in ML 5 or 6.  I'd sure like to get some
ideas from MarkLogic about this.  It doesn't seem that inserting external
documents containing an xml declaration should be difficult to insert.

Tim

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Geert Josten
Sent: Friday, December 14, 2012 3:00 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] XDMP-BADPINAME:
xdmp:get-request-body("xml")

Hi Tim,

I recommend creating a test case that shows the problem as clearly as
possible, and file an RFE at support.

Cheers,
Geert

> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:general-
> [email protected]] Namens Tim Meagher
> Verzonden: vrijdag 14 december 2012 19:09
> Aan: 'MarkLogic Developer Discussion'
> Onderwerp: Re: [MarkLogic Dev General] XDMP-BADPINAME: xdmp:get-
> request-body("xml")
>
> Hi Folks,
>
> I found a note from Geert that MarkLogic does not need the xml
processing
> instruction, so I removed it from the XML document I was trying to
insert
> into a MarkLogic database running 6.0.2 and it worked.  Why isn't
> 6.0.2 merely ignoring the processing instruction when it is included?
>
> Tim
>
> -----Original Message-----
> From: Tim Meagher [mailto:[email protected]]
> Sent: Friday, December 14, 2012 11:16 AM
> To: 'MarkLogic Developer Discussion'
> Subject: XDMP-BADPINAME: xdmp:get-request-body("xml")
>
> XDMP-BADPINAME: xdmp:get-request-body("xml") -- Invalid processing
> instruction name "xml" at  line 1
>
> Can someone tell me what this is about? "xml" is one of the allowable
types
> per the documentation at
> http://docs.marklogic.com/xdmp:get-request-body?q=xdmp:get-request-
> body .
> I've been running this code regularly on ml 4.1 but it is failing on
> ml 6.0.2.
>
> Tim Meagher
>
>
> _______________________________________________
> 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
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to