[MarkLogic Dev General] Schema validation - Retrieving all errors at once

2012-09-17 Thread Gnanaprakash.Bodireddy
Hi

I am validating the XML's using the schema I stored in the schema database.

Validation works fine. But, I am getting only one error when xml is not valid.

Currently I am looping through all nodes of an XML and validating them with the 
XSD which is giving me all errors. But this takes more time and exceeds time 
limit some times.

Is there any way to get all errors at a time?

Thanks and Regards,

Gnanaprakash Bodireddy

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] REST docs api, how to specify a database at PUT?

2012-09-17 Thread Geert Josten
Hi,

According to the new docs (congrats by the way, looks great!), you can
specify a forest-name, but no database-name. But what if you don't want to
target a specific forest?

http://docs.marklogic.com/REST/PUT/v1/documents

Kind regards,
Geert
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Transferring DLS managed documents

2012-09-17 Thread Gavin Haydon
Hi,

I have some documents that have been managed by DLS (Document Library 
Services) that I wish to transfer to another database. So far I have 
used xqsync to dump the documents to zip files, since xqsync retains the 
all important permissions and properties for you for every document.

However, I foresee a problem when using xqsync to ingest these documents 
into a destination database on a separate MarkLogic instance.

DLS has embedded the IDs of roles and permissions into the properties of 
each document. I believe this is so DLS can restrict access to the 
documents to 'dls users' but can still check the actual permissions of 
the user against these permissions stored in the properties. However 
these embedded permissions are using IDs that are specific to the 
Security database in effect for the content database.

If I were to ingest these documents elsewhere, the IDs will not exist in 
the destination Security database. Therefore the DLS API will fail when 
it checks permissions on access to these documents.

Has anybody come across this problem before and found a workable 
solution? I can only think of 'fixing up' the documents during the 
transfer to have the correct IDs for the destination, perhaps during 
load time or by using corb afterwards. I really don’t want the documents 
to go in with incorrect IDs.

Regards,
Gavin Haydon
Press Association Ltd

___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] REST docs api, how to specify a database at PUT?

2012-09-17 Thread John Snelson
I believe the REST API is installed targeting a specific database. You 
can install another instance of the REST API to target another database.

John

On 17/09/12 11:35, Geert Josten wrote:
 Hi,

 According to the new docs (congrats by the way, looks great!), you can
 specify a forest-name, but no database-name. But what if you don't want to
 target a specific forest?

 http://docs.marklogic.com/REST/PUT/v1/documents

 Kind regards,
 Geert

-- 
John Snelson, Lead Engineerhttp://twitter.com/jpcs
MarkLogic Corporation http://www.marklogic.com
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] We Got Six

2012-09-17 Thread Eric Bloch
See http://developer.marklogic.com/blog/we-got-six

We Got Six

Today, we at MarkLogic are very proud to release MarkLogic 
6http://developer.marklogic.com/products/marklogic-server/6.0.  It's more 
powerful, more accessible, and trusted as ever.   Below are some highlights

New APIs!

We've created entire new RESThttp://developer.marklogic.com/try/rest/index 
and Javahttp://developer.marklogic.com/try/java/index APIs to make the 
awesome that is MarkLogic available to vast new communities of software 
developers.  These APIs enable developers familiar with Java or REST APIs to 
get going quickly, yet they are also full-featured.  Their rich functionality 
enables developers to build complete database and search applications.

Beyond the product documentation (guides and references) as well as new 
tutorialshttp://developer.marklogic.com/learn we've provided to get folks 
going, there is also a sample application built entirely via the MarkLogic Java 
API herehttp://developer.marklogic.com/code/top-songs.

Now with JSON

Along with these new APIs, you'll also find support for JSONhttp://json.org/. 
 The data format of the web is now easily stored, searched, queried, 
transformed, and analyzed directly in MarkLogic.

In-Database Analytic Functions and MapReduce

Performance is a constant focus here and this feature is all about that.  
MarkLogic 6 comes with a large set of analytic functions built on top of our 
internal mechanism for distributed processing (aka 
MapReducehttp://en.wikipedia.org/wiki/MapReduce) to provide high-performance 
calculations. Beyond these tools, for developers who need to push the envelope, 
we are also exposing the APIs as well as plugin interfaces to the MapReduce 
mechanism inside MarkLogic. Seriously. You can provide your own C/C++ functions 
for computing custom analytics that MarkLogic will run close to your data.

BI Tools Inteface

You can hook up IBM Cognoshttp://www-01.ibm.com/software/analytics/cognos/ or 
Tableauhttp://www.tableausoftware.com/ to MarkLogic via a live connection for 
real-time reporting and analytic investigations. That in itself is cool. But 
the mechanism we're providing for this is... an ODBC driver. For now, the 
driver is only supported for use with Cognos and Tableau, but you can imagine 
what we're thinking here with this awesome first step. Yep, a SQL interface to 
a NoSQL database. Interesting.

UI Widgets

The MarkLogic Visualization 
Widgetshttp://developer.marklogic.com/products/visualization-widgets are a 
set of open-source-licensed HTML5 widgets for charts, graphs and maps that 
provide out-of-the box user interface connectivity to MarkLogic. We provide the 
widgets, of course, but we've also added them into Application Builder, so that 
you can, with a few quick keystrokes and clicks, build an advanced search 
application with these visualization tools.

Content Pump

With this new command-line toolhttp://developer.marklogic.com/products/mlcp, 
it's a snap to load content from an OS filesystem or Hadoops 
HDFShttp://hadoop.apache.org/index.html to MarkLogic.  You can also just as 
easily export from MarkLogic to a filesystem or HDFS.  The tool also introduces 
a new platform-independent MarkLogic database archive format.

Documentation

What about the docshttp://docs.marklogic.com/?  Every developer knows how 
important good documenation is.

Since I took over the helm of 
http://developer.marklogic.comhttp://developer.marklogic.com/ in 2010, there 
are two things I've wanted to improve in this area. One is to make it easier 
for folks to contribute  - and the other is to improve site search. Both of 
these are still works in progress, but as we launch MarkLogic 6, we've made 
real advances in these areas. In particular, we've integrated documentation 
browsing and search directly into the MarkLogic application that runs our site, 
enabling Disqushttp://www.disqus.com/ comments directly in our reference 
pages.  We now have excellent URLs for our docs, a reasonable HTML 
representation of our content, and integrated search and faceting. The feature 
list for the integrated docs.marklogic.comhttp://docs.marklogic.com/ site 
includes:


*   Product documentation is integrated seamlessly in the developer site. 
This includes MarkLogic 6 docs (as well as older versions for customers who've 
not yet upgraded)
*   All the content is searchable via MarkLogic search (including search 
suggestions, facets and snippeted results)
*   We have an interactive, filtering table-of-contents for our docs.
*   The docs have Smart URLs for references, guides, and chapters. For 
example, the URL for a function is based on name of function (e.g. 
http://docs.marklogic.com/fn:doc is page for function named 'fn:doc')
*   All reference pages are comment enabled for user interaction. Each 
reference page has a (moderated) Disqus comment area at the bottom - comments 
are stored at Disqus as well as in MarkLogic!
*   We continue to offer 

Re: [MarkLogic Dev General] We Got Six

2012-09-17 Thread Ryan Dew
Looks like a great release! I noticed that there are also some less
pronounced, but equally cool, updates which I've mentioned on my blog (
http://maxdewpoint.blogspot.com/2012/09/marklogic-60-released.html ). Is
there a reason some of these updates aren't mentioned or perhaps I'm just
missing where the updates were announced?

-Ryan Dew

On Mon, Sep 17, 2012 at 7:07 AM, Eric Bloch eric.bl...@marklogic.comwrote:

 See http://developer.marklogic.com/blog/we-got-six
 *
 *
 *We Got Six*

 Today, we at MarkLogic are very proud to release MarkLogic 
 6http://developer.marklogic.com/products/marklogic-server/6.0.
  It's more powerful, more accessible, and trusted as ever.   Below are some
 highlights

 *New APIs!*

 We've created entire new RESThttp://developer.marklogic.com/try/rest/index
  and Java http://developer.marklogic.com/try/java/index APIs to make
 the awesome that is MarkLogic available to vast new communities of software
 developers.  These APIs enable developers familiar with Java or REST APIs
 to get going quickly, yet they are also full-featured.  Their rich
 functionality enables developers to build complete database and search
 applications.

 Beyond the product documentation (guides and references) as well as new
 tutorials http://developer.marklogic.com/learn we've provided to get
 folks going, there is also a sample application built entirely via the
 MarkLogic Java API here http://developer.marklogic.com/code/top-songs.


 *Now with JSON*
 *
 *

 Along with these new APIs, you'll also find support for 
 JSONhttp://json.org/.
  The *data format of the web* is now easily stored, searched, queried,
 transformed, and analyzed directly in MarkLogic.


 *In-Database* *Analytic Functions and** MapReduce *
 *
 *

 Performance is a constant focus here and this feature is all about that.
  MarkLogic 6 comes with a large set of analytic functions built on top of
 our internal mechanism for distributed processing (aka 
 MapReducehttp://en.wikipedia.org/wiki/MapReduce)
 to provide high-performance calculations. Beyond these tools, for
 developers who need to push the envelope, we are also exposing the APIs as
 well as plugin interfaces to the MapReduce mechanism inside MarkLogic.
 Seriously. You can provide your own C/C++ functions for computing custom
 analytics that MarkLogic will run close to your data.


 *BI Tools Inteface*
 *
 *

 You can hook up IBM Cognoshttp://www-01.ibm.com/software/analytics/cognos/
  or Tableau http://www.tableausoftware.com/ to MarkLogic via a live
 connection for real-time reporting and analytic investigations. That in
 itself is cool. But the mechanism we're providing for this is... an ODBC
 driver. For now, the driver is only supported for use with Cognos and
 Tableau, but you can imagine what we're thinking here with this awesome
 first step. Yep, a SQL interface to a NoSQL database. Interesting.

 *
 *
 *UI Widgets*


 The MarkLogic Visualization 
 Widgetshttp://developer.marklogic.com/products/visualization-widgets are
 a set of open-source-licensed HTML5 widgets for charts, graphs and maps
 that provide out-of-the box user interface connectivity to MarkLogic. We
 provide the widgets, of course, but we've also added them into Application
 Builder, so that you can, with a few quick keystrokes and clicks, build an
 advanced search application with these visualization tools.


 *Content Pump*
 *
 *

 With this new command-line toolhttp://developer.marklogic.com/products/mlcp,
 it's a snap to load content from an OS filesystem or Hadoops 
 HDFShttp://hadoop.apache.org/index.html to
 MarkLogic.  You can also just as easily export from MarkLogic to a
 filesystem or HDFS.  The tool also introduces a new platform-independent
 MarkLogic database archive format.

 *Documentation*

 What about the docs http://docs.marklogic.com/?  Every developer knows
 how important good documenation is.

 Since I took over the helm of http://developer.marklogic.com in 2010,
 there are two things I've wanted to improve in this area. One is to make it
 easier for folks to contribute  - and the other is to improve site search.
 Both of these are still works in progress, but as we launch MarkLogic 6,
 we've made real advances in these areas. In particular, we've integrated
 documentation browsing and search directly into the MarkLogic application
 that runs our site, enabling Disqus http://www.disqus.com/ comments
 directly in our reference pages.  We now have excellent URLs for our docs,
 a reasonable HTML representation of our content, and integrated search and
 faceting. The feature list for the integrated docs.marklogic.com site
 includes:


- Product documentation is integrated seamlessly in the developer
   site. This includes MarkLogic 6 docs (as well as older versions for
   customers who've not yet upgraded)
   - All the content is *searchable via MarkLogic search* (including search
   suggestions, facets and snippeted results)
   - We have an *interactive, 

Re: [MarkLogic Dev General] Schema validation - Retrieving all errors at once

2012-09-17 Thread Mary Holstege
On Mon, 17 Sep 2012 02:15:04 -0700, gnanaprakash.bodire...@cognizant.com  
gnanaprakash.bodire...@cognizant.com wrote:

 Hi

 I am validating the XML’s using the schema I stored in the schema  
 database.

 Validation works fine. But, I am getting only one error when xml is not  
 valid.

 Currently I am looping through all nodes of an XML and validating them  
 with the XSD which is giving me all errors. But this takes more time and  
 exceeds time limit some times.

 Is there any way to get all errors at a time?

 Thanks and Regards,

 Gnanaprakash Bodireddy

You can either use the xdmp:validate builtin or
the validate full extension expression.

e.g.

xdmp:validate( $node, strict)

or

validate full { $node }

xdmp:validate will return you an XML
node reporting any and all errors it found.

validate full will either return the node back
or a master error with all the found errors
as data inside it.

For certain kinds of errors you are apt to
get cascading errors that aren't really
separate problems, or to have actual
errors be skipped as it tries to resync.

//Mary
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] We Got Six

2012-09-17 Thread John Snelson
Hi Ryan,

Glad to see you're enthusiastic about XQuery 3 and MarkLogic. You've 
called some of my personal favourite things in your blog post, and I 
look forward to seeing the ways you and others in the community put them 
use.

However as I'm sure you know, the XQuery 3 specification is not yet a 
recommendation, and support for it is not complete in MarkLogic 6. We've 
chosen to keep the XQuery 3 features implemented in ML 6 in Early Access 
(or technology preview) mode right now, to reflect those facts. It's 
therefore not an officially supported or documented feature yet.

That said, if you search around in some of the new XQuery code that 
ships with ML6, you'll see that we've been using some of the new 
features ourselves. The engineers at MarkLogic are the first customers 
for our XQuery support, and many of us are very enthusiastic about the 
capabilities that XQuery 3 gives us.

John

On 17/09/12 16:12, Ryan Dew wrote:
 Looks like a great release! I noticed that there are also some less
 pronounced, but equally cool, updates which I've mentioned on my blog (
 http://maxdewpoint.blogspot.com/2012/09/marklogic-60-released.html ). Is
 there a reason some of these updates aren't mentioned or perhaps I'm
 just missing where the updates were announced?

 -Ryan Dew

-- 
John Snelson, Lead Engineerhttp://twitter.com/jpcs
MarkLogic Corporation http://www.marklogic.com
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] We Got Six

2012-09-17 Thread Eric Bloch
Hey Ryan,

Thanks! I'm optimistic (no promises but it's on my todo list) to put out some 
specific materials (screencast likely) on the XQuery language updates.  They 
are awesome too :)

Eric


From: general-boun...@developer.marklogic.com 
[general-boun...@developer.marklogic.com] On Behalf Of Ryan Dew 
[ryan.j@gmail.com]
Sent: Monday, September 17, 2012 8:12 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] We Got Six

Looks like a great release! I noticed that there are also some less pronounced, 
but equally cool, updates which I've mentioned on my blog ( 
http://maxdewpoint.blogspot.com/2012/09/marklogic-60-released.html ). Is there 
a reason some of these updates aren't mentioned or perhaps I'm just missing 
where the updates were announced?

-Ryan Dew

On Mon, Sep 17, 2012 at 7:07 AM, Eric Bloch 
eric.bl...@marklogic.commailto:eric.bl...@marklogic.com wrote:
See http://developer.marklogic.com/blog/we-got-six

We Got Six

Today, we at MarkLogic are very proud to release MarkLogic 
6http://developer.marklogic.com/products/marklogic-server/6.0.  It's more 
powerful, more accessible, and trusted as ever.   Below are some highlights

New APIs!

We've created entire new RESThttp://developer.marklogic.com/try/rest/index 
and Javahttp://developer.marklogic.com/try/java/index APIs to make the 
awesome that is MarkLogic available to vast new communities of software 
developers.  These APIs enable developers familiar with Java or REST APIs to 
get going quickly, yet they are also full-featured.  Their rich functionality 
enables developers to build complete database and search applications.

Beyond the product documentation (guides and references) as well as new 
tutorialshttp://developer.marklogic.com/learn we've provided to get folks 
going, there is also a sample application built entirely via the MarkLogic Java 
API herehttp://developer.marklogic.com/code/top-songs.

Now with JSON

Along with these new APIs, you'll also find support for JSONhttp://json.org/. 
 The data format of the web is now easily stored, searched, queried, 
transformed, and analyzed directly in MarkLogic.

In-Database Analytic Functions and MapReduce

Performance is a constant focus here and this feature is all about that.  
MarkLogic 6 comes with a large set of analytic functions built on top of our 
internal mechanism for distributed processing (aka 
MapReducehttp://en.wikipedia.org/wiki/MapReduce) to provide high-performance 
calculations. Beyond these tools, for developers who need to push the envelope, 
we are also exposing the APIs as well as plugin interfaces to the MapReduce 
mechanism inside MarkLogic. Seriously. You can provide your own C/C++ functions 
for computing custom analytics that MarkLogic will run close to your data.

BI Tools Inteface

You can hook up IBM Cognoshttp://www-01.ibm.com/software/analytics/cognos/ or 
Tableauhttp://www.tableausoftware.com/ to MarkLogic via a live connection for 
real-time reporting and analytic investigations. That in itself is cool. But 
the mechanism we're providing for this is... an ODBC driver. For now, the 
driver is only supported for use with Cognos and Tableau, but you can imagine 
what we're thinking here with this awesome first step. Yep, a SQL interface to 
a NoSQL database. Interesting.

UI Widgets

The MarkLogic Visualization 
Widgetshttp://developer.marklogic.com/products/visualization-widgets are a 
set of open-source-licensed HTML5 widgets for charts, graphs and maps that 
provide out-of-the box user interface connectivity to MarkLogic. We provide the 
widgets, of course, but we've also added them into Application Builder, so that 
you can, with a few quick keystrokes and clicks, build an advanced search 
application with these visualization tools.

Content Pump

With this new command-line toolhttp://developer.marklogic.com/products/mlcp, 
it's a snap to load content from an OS filesystem or Hadoops 
HDFShttp://hadoop.apache.org/index.html to MarkLogic.  You can also just as 
easily export from MarkLogic to a filesystem or HDFS.  The tool also introduces 
a new platform-independent MarkLogic database archive format.

Documentation

What about the docshttp://docs.marklogic.com/?  Every developer knows how 
important good documenation is.

Since I took over the helm of 
http://developer.marklogic.comhttp://developer.marklogic.com/ in 2010, there 
are two things I've wanted to improve in this area. One is to make it easier 
for folks to contribute  - and the other is to improve site search. Both of 
these are still works in progress, but as we launch MarkLogic 6, we've made 
real advances in these areas. In particular, we've integrated documentation 
browsing and search directly into the MarkLogic application that runs our site, 
enabling Disqushttp://www.disqus.com/ comments directly in our reference 
pages.  We now have excellent URLs for our docs, a reasonable HTML 
representation of our content, and 

Re: [MarkLogic Dev General] xdmp:get-request-field documentation

2012-09-17 Thread Danny Sokolsky
Hi Florent,

A couple of things here:

*  The return type in the doc for xdmp:get-request-field is wrong--it should be 
item()*.  We will work to correct that.  

* The type of node will in most cases depend on the mimetype, which for the 
file types will be based on its extension.  For a list of mimetypes, you can 
look in the Admin Interface (and you can change and add things there too).  The 
mimetype along with its default document type ought to be enough let you know 
what to expect (I think...).

* as far as decoding a binary node, I don't think you can do that unless you 
know what type of binary it is.  From MarkLogic's pov, it is just a bunch of 
bits.

Hope that helps.

-Danny

-Original Message-
From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Florent Georges
Sent: Sunday, September 16, 2012 8:23 AM
To: Florent Georges; Joshua David Ewell; MarkLogic Developer Discussion; 
MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] xdmp:get-request-field documentation

  Hi,

  After more tests on xdmp:get-request-field() when the field is a
file field (from a file type of HTML form input), it seems the
returned value is always either:

    - a binary node (instance of binary())
    - or a document node with a text node as content (instance of
      document-node() and fn:exists($file/text()))

  Unfortunately this is not documented in the MarkLogic documentation,
so I don't know which logic is applied to choose between both cases.
So two questions:

  1/ is this logic documented somewhere?
  2/ is there any way to get a text node or a string from a binary
     node? (that is, how to decode the binary?)

  Regards,

-- 
Florent Georges
http://fgeorges.org/
http://h2oconsulting.be/


Florent Georges wrote:
 Joshua David Ewell wrote:
 
   Hi,
 
 xdmp:get-request-field returns the named request field as a string.
 
    Thank you.  But I just tried and instance of xs:string
 returns false whilst instance of binary() returns false...

 The documentation shows that the result from xdmp:get-request-field
 returns a string or nothing, hence the * in as string*. It is a
 thought, but it may be possible that the request field is returning
 nothing and that is why you may be getting false in both test
 cases.
 
   Oops...  Sorry, I made a typo in my previous email, I DO GET
 TRUE for the expression instance of binary().
 
   Sorry, that was confusing, to say the least :-/
 
   Regards,
 
 -- 
 Florent Georges
 http://fgeorges.org/
 http://h2oconsulting.be/
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Schema validation - Retrieving all errors at once

2012-09-17 Thread Gnanaprakash.Bodireddy
Thanks a lot Mary. It worked brilliantly. ☺



Thanks and Regards,



Gnanaprakash Bodireddy

Sr Associate - Projects | IME

Cognizant Technology Solutions

VNET: 672103

(O): +91 (40) 4451 extn: 672103

(M): +91-8897575644



-Original Message-
From: Mary Holstege [mailto:mary.holst...@marklogic.com]
Sent: Monday, September 17, 2012 8:49 PM
To: general@developer.marklogic.com; Bodireddy, Gnanaprakash (Cognizant)
Subject: Re: [MarkLogic Dev General] Schema validation - Retrieving all errors 
at once



On Mon, 17 Sep 2012 02:15:04 -0700, 
gnanaprakash.bodire...@cognizant.commailto:gnanaprakash.bodire...@cognizant.com

gnanaprakash.bodire...@cognizant.commailto:gnanaprakash.bodire...@cognizant.com
 wrote:



 Hi



 I am validating the XML’s using the schema I stored in the schema

 database.



 Validation works fine. But, I am getting only one error when xml is

 not valid.



 Currently I am looping through all nodes of an XML and validating them

 with the XSD which is giving me all errors. But this takes more time

 and exceeds time limit some times.



 Is there any way to get all errors at a time?



 Thanks and Regards,



 Gnanaprakash Bodireddy



You can either use the xdmp:validate builtin or the validate full extension 
expression.



e.g.



xdmp:validate( $node, strict)



or



validate full { $node }



xdmp:validate will return you an XML

node reporting any and all errors it found.



validate full will either return the node back or a master error with all the 
found errors as data inside it.



For certain kinds of errors you are apt to get cascading errors that aren't 
really separate problems, or to have actual errors be skipped as it tries to 
resync.



//Mary

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general