Re: [basex-talk] Indexes getting removed after update operation in database

2020-06-02 Thread DK Singh
Thanks Christian for you quick response

As i understood after from the index documentation after each
update db:optimize function should be called to rebuild the index
structure. so i will implement that

If i set  AUTOOPTIMIZE and UPDINDEX true in local option ".basex " file so
it should work ?

Regards
Dharmendra Kumar Singh



On Tue, Jun 2, 2020 at 8:55 PM Christian Grün 
wrote:

> Hi Dharmendra,
>
> Please check out our documentation [1]; it will give you more insight
> into how indexes are handled in BaseX.
>
> Best,
> Christian
>
> [1] https://docs.basex.org/wiki/Indexes#Updates
>
>
>
> On Tue, Jun 2, 2020 at 4:55 PM DK Singh  wrote:
> >
> > Hi,
> >
> > I am using Basex version 8.6.6 i am creating full text indexes on
> database from the GUI, when any update operation is happening on the
> database all created indexes getting removed.
> >
> > when i use ft module to search anything then error occurs that database
> "test" has not full text index.
> >
> > I am expecting if index already created then it should not removed,
> please suggest how can i resolve this issue.
> >
> >
> > Regards
> >
> > Dharmendra Kumar Singh
>


[basex-talk] Indexes getting removed after update operation in database

2020-06-02 Thread DK Singh
Hi,

I am using Basex version 8.6.6 i am creating full text indexes on database
from the GUI, when any update operation is happening on the database all
created indexes getting removed.

when i use ft module to search anything then error occurs that database
"test" has not full text index.

I am expecting if index already created then it should not removed, please
suggest how can i resolve this issue.


Regards

Dharmendra Kumar Singh


[basex-talk] Copy data from one database to another(basex)

2020-03-18 Thread DK Singh
Hi
I have to copy content from one database to another database, database
containing xml files and word files. When i try to copy using function
db:copy('test','test1') where 'test' is source database and 'test1' is
destination database then it copies only xml files word files are not
copied, can anyone suggest how can i achieve this.

Regards
Dharmendra Kumar Singh


[basex-talk] Change the default user and its Password

2018-10-11 Thread DK Singh
Hi All,

I have to change the default user credential of BaseX  where should i made
the changes,
when i access the url "http://localhost:8984/dba; now it opens with the
default credentials which is "admin" now i have to change it,

i have made the changes in the web.xml


org.basex.user
dharmendra
  

but it is not working still it is taking the default credentials.

Regards
Dharmendra Kumar Singh


[basex-talk] XML Merging while reading from the DB

2018-08-17 Thread DK Singh
Hi All,

I have ingested the XML into DB having node "include"  and within
"include"  some file referenced, when i read the file from the DB it merges
the each XML , is there any way to disabled include functionality while
reading the file.

Input
==
http://docbook.org/ns/docbook; xmlns:xlink="
http://www.w3.org/1999/xlink; xmlns:mml="http://www.w3.org/1998/Math/MathML;
xmlns:xi="http://www.w3.org/2001/XInclude; version="5.0-extension bp-0.1"
role="fullText" xml:id="b-9781845928315" xml:lang="en"
outputformat='e-Only'>




i am reading the file using fn:doc() or db:open() both the function
Merging  included files.

Note: i don't have to set the option on the DB label to disable xinclude .

Regards
Dharmendra Kumar Sing


[basex-talk] XML Files merging while reading from the DB

2018-08-17 Thread DK Singh
Hi All,

I have ingested the XML into DB having node "include"  and within
"include"  some file referenced, when i read the file from the DB it merges
the each XML , is there any way to disabled include functionality while
reading the file.

Input
==
http://docbook.org/ns/docbook; xmlns:xlink="
http://www.w3.org/1999/xlink; xmlns:mml="http://www.w3.org/1998/Math/MathML;
xmlns:xi="http://www.w3.org/2001/XInclude; version="5.0-extension bp-0.1"
role="fullText" xml:id="b-9781845928315" xml:lang="en"
outputformat='e-Only'>




i am reading the file using fn:doc() or db:open() both the function
Merging  included files.

Note: i don't have to set the option on the DB label to disable xinclude .

Regards
Dharmendra Kumar Singh


Re: [basex-talk] Schematron package error

2018-07-23 Thread DK Singh
Hi All,

I got the solution actually i was using Saxon9ee so i have changed the
Saxon9pe and it worked now schematron running fine.

Regards
Dharmendra Kumar Singh

On Fri, Jul 20, 2018 at 5:07 PM DK Singh  wrote:

> Hi All,
>
> I am doing the schematron validation against XML docuemnt but i am getting
> these errors.
>
> Bad name element: XPath error. No XPath. Bad name element: XPath error. No
> XPath. Error on line 1409 column 61 of iso_dsdl_include.xsl: Too many
> nested template or function calls. The stylesheet may be looping. at
> xsl:call-template name="sch-check:strip-strings"
> (file:///C:/Program%20Files%20(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/iso-schematron/iso_dsdl_include.xsl#1409)
>
>
> it looks like basex schematron pacakge throwing the error to run
> schematron validation.
> can anyone suggest how can i resolve this errors.
>
> Regards
> Dharmendra Kumar Singh
>


Re: [basex-talk] Schematron package error

2018-07-22 Thread DK Singh
Thank U Andy for your response, I have tried but it is giving schematron
compilation error, but when I validate on Oxygen editor xmls got validated,
as github documentation I am doing first schematron compilation then
validating the XML, SO how can I resolve this error Now

On Sun 22 Jul, 2018, 9:39 PM James Ball,  wrote:

> Hello Dharmendra,
>
> Have you made sure that the Schematron is compiled before using it to
> validate? I think this is the error you get if you try to use an
> un-compiled Schematron file to perform a validation.
>
> The necessary steps are outlined with the module documentation on GitHub
> and I had it working successfully just a week ago.
>
> Regards, James
>
> > Date: Fri, 20 Jul 2018 17:07:30 +0530
> > From: DK Singh 
> > To: BaseX 
> > Subject: [basex-talk] Schematron package error
> > Message-ID:
> >twju9kw...@mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Hi All,
> >
> > I am doing the schematron validation against XML docuemnt but i am
> getting
> > these errors.
> >
> > Bad name element: XPath error. No XPath. Bad name element: XPath error.
> No
> > XPath. Error on line 1409 column 61 of iso_dsdl_include.xsl: Too many
> > nested template or function calls. The stylesheet may be looping. at
> > xsl:call-template name="sch-check:strip-strings"
> >
> (file:///C:/Program%20Files%20(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/iso-schematron/iso_dsdl_include.xsl#1409)
> >
> >
> > it looks like basex schematron pacakge throwing the error to run
> schematron
> > validation.
> > can anyone suggest how can i resolve this errors.
> >
> > Regards
> > Dharmendra Kumar Singh
> > -- next part --
> > An HTML attachment was scrubbed...
> > URL: <
> http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20180720/3801dbc8/attachment-0001.html
> >
> >
>
>


Re: [basex-talk] Schematron package error

2018-07-20 Thread DK Singh
HI  Christial,

i am doing validation like this:

import module namespace schematron = "
http://github.com/Schematron/schematron-basex;;

let $sch := schematron:compile(doc('D:\2018\schemas\docbook-mods.sch'))
let $xml := fn:doc('D:\2018\InthisIssue66.xml')
let $validation := schematron:validate($xml, $sch)

return $validation



then it is giving thease kind of errors.

Error:
Stopped at C:/Program Files
(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/schematron.xqm,
39/31:
[bxerr:BXSL0001] Bad name element: XPath error. No XPath.
Bad name element: XPath error. No XPath.
Bad name element: XPath error. No XPath.
Error on line 1409 column 61 of iso_dsdl_include.xsl:
  Too many nested template or function calls. The stylesheet may be looping.
  at xsl:call-template name="sch-check:strip-strings"
(file:///C:/Program%20Files%20(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/iso-schematron/iso_dsdl_include.xsl#1409)
  at xsl:call-template name="sch-check:strip-strings"
(file:///C:/Program%20Files%20(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/iso-schematron/iso_dsdl_include.xsl#1409)
  at xsl:call-template name="sch-check:strip-strings"
(file:///C:/Program%20Files%20(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/iso-schematron/iso_dsdl_include.xsl#1409)
  at xsl:call-template name="sch-check:strip-strings"
(file:///C:/Program%20Files%20(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/iso-schematron/iso_dsdl_include.xsl#1409)
  at xsl:call-template name="sch-check:strip-strings"
(file:///C:/Program%20Files%20(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/iso-schematron/iso_dsdl_include.xsl#1409)

Regards
Dharmendra Kumar Singh




On Fri, Jul 20, 2018 at 5:12 PM Christian Grün 
wrote:

> As usual, send us a little reproducible example. Thanks.
>
> DK Singh  schrieb am Fr., 20. Juli 2018, 13:39:
>
>> Hi All,
>>
>> I am doing the schematron validation against XML docuemnt but i am
>> getting these errors.
>>
>> Bad name element: XPath error. No XPath. Bad name element: XPath error.
>> No XPath. Error on line 1409 column 61 of iso_dsdl_include.xsl: Too many
>> nested template or function calls. The stylesheet may be looping. at
>> xsl:call-template name="sch-check:strip-strings"
>> (file:///C:/Program%20Files%20(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/iso-schematron/iso_dsdl_include.xsl#1409)
>>
>>
>> it looks like basex schematron pacakge throwing the error to run
>> schematron validation.
>> can anyone suggest how can i resolve this errors.
>>
>> Regards
>> Dharmendra Kumar Singh
>>
>


[basex-talk] Schematron package error

2018-07-20 Thread DK Singh
Hi All,

I am doing the schematron validation against XML docuemnt but i am getting
these errors.

Bad name element: XPath error. No XPath. Bad name element: XPath error. No
XPath. Error on line 1409 column 61 of iso_dsdl_include.xsl: Too many
nested template or function calls. The stylesheet may be looping. at
xsl:call-template name="sch-check:strip-strings"
(file:///C:/Program%20Files%20(x86)/BaseX/repo/http-github.com-Schematron-schematron-basex-1.2/content/iso-schematron/iso_dsdl_include.xsl#1409)


it looks like basex schematron pacakge throwing the error to run schematron
validation.
can anyone suggest how can i resolve this errors.

Regards
Dharmendra Kumar Singh


Re: [basex-talk] XML well-formed error

2018-06-06 Thread DK Singh
it is getting transformed on oxygen, but in the basex GUI not getting
transformed, my req is to transformed file has to be write on the file
system, but on the Basex GUI not getting transformed

Regards
Dharmendra Kumar Singh

On Wed 6 Jun, 2018, 4:26 PM Andy Bunce,  wrote:

> Hi  Dharmendra Kumar,
>
> When I run this in Oxygen, loading the result into an editor window, I get
> the same message that BaseX  gives:
>
> Description: The markup in the document following the root element must be
> well-formed.
> Start location: 1:68199
> URL:
> http://www.saxonica.com/html/documentation/javadoc/net/sf/saxon/trans/SaxonErrorCode.html#SXXP0003
>
>
> Your transform is not generating a valid XML document.
>
> Regards
> /Andy
>
> On 6 June 2018 at 11:07, DK Singh  wrote:
>
>> Hi Christian for your reference i am attaching the XSLT and XML which i
>> am trying to transfom using BaseX GUI
>>
>> QUERY
>> =
>>
>> let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml')
>> let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt')
>> return  xslt:transform($xml,$xsl)
>>
>> Error
>> ==
>> Error:
>> Stopped at D:/2017/BLOOMSBURRY/testing-code/eBloomsbury/file, 3/23:
>> [FODC0002] "" (Line 1): The markup in the document following the root
>> element must be well-formed.
>>
>> you can try out to simply run the query on BaseX GUI , i have attached
>> the XML and  XSLt
>>
>> Regards
>> Dharmendra Kumar Sngh
>>
>>
>>
>> On Wed, Jun 6, 2018 at 3:24 PM, Christian Grün > > wrote:
>>
>>> Hi
>>> ​
>>> Dharmendra Kumar.
>>>
>>> P
>>> lease provide us with a little self-contained example (see
>>> http://sscce.org/ for more information).
>>>
>>> ​
>>> Thanks in advance ;)
>>> Christian
>>>
>>>
>>>
>>> On Wed, Jun 6, 2018 at 11:53 AM, DK Singh  wrote:
>>>
>>>> Hi Christian,
>>>> i am running the simple query on Basex GUI
>>>>
>>>> let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml')
>>>> let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt')
>>>> return  xslt:transform($xml,$xsl)
>>>> Regards
>>>> ​​
>>>> Dharmendra Kumar Singh
>>>>
>>>> On Wed, Jun 6, 2018 at 2:49 PM, Christian Grün <
>>>> christian.gr...@gmail.com> wrote:
>>>>
>>>>> Hi ​Dhamendra Kumar,​
>>>>>
>>>>> As usual,
>>>>> ​​
>>>>> please provide us with a little example (see http://sscce.org/ for
>>>>> more information).
>>>>>
>>>>> ​​
>>>>> Thanks in advance,
>>>>> Christian
>>>>>
>>>>>
>>>>> On Wed, Jun 6, 2018 at 11:16 AM, DK Singh 
>>>>> wrote:
>>>>>
>>>>>> Hi All,
>>>>>> I have a XML file when i apply xslt using xslt:transform function it
>>>>>> is giving well formed error, even i tried on BaseX UI  using
>>>>>> xslt:transform function
>>>>>>
>>>>>> [FODC0002] "" (Line 1): The markup in the document following the root
>>>>>> element must be well-formed.
>>>>>>
>>>>>> but when the same file i transform on the oxygeng editor it getting
>>>>>> transformed, can anyone suggest what going wrong.
>>>>>> Regards
>>>>>> Dharmendra Kumar Singh
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>


Re: [basex-talk] XML well-formed error

2018-06-06 Thread DK Singh
Hi Christian,
i am running the simple query on Basex GUI

let $xml := fn:doc('D:\2018\VCLP-A2 - admin.xml')
let $xsl := fn:doc('D:\2018\DBK2BloomsburyDbk.xslt')
return  xslt:transform($xml,$xsl)
Regards
Dharmendra Kumar Singh

On Wed, Jun 6, 2018 at 2:49 PM, Christian Grün 
wrote:

> Hi ​Dhamendra Kumar,​
>
> As usual, please provide us with a little example (see http://sscce.org/
> for more information).
>
> Thanks in advance,
> Christian
>
>
> On Wed, Jun 6, 2018 at 11:16 AM, DK Singh  wrote:
>
>> Hi All,
>> I have a XML file when i apply xslt using xslt:transform function it is
>> giving well formed error, even i tried on BaseX UI  using xslt:transform
>> function
>>
>> [FODC0002] "" (Line 1): The markup in the document following the root
>> element must be well-formed.
>>
>> but when the same file i transform on the oxygeng editor it getting
>> transformed, can anyone suggest what going wrong.
>> Regards
>> Dharmendra Kumar Singh
>>
>
>


[basex-talk] XML well-formed error

2018-06-06 Thread DK Singh
Hi All,
I have a XML file when i apply xslt using xslt:transform function it is
giving well formed error, even i tried on BaseX UI  using xslt:transform
function

[FODC0002] "" (Line 1): The markup in the document following the root
element must be well-formed.

but when the same file i transform on the oxygeng editor it getting
transformed, can anyone suggest what going wrong.
Regards
Dharmendra Kumar Singh


Re: [basex-talk] Set indent no at database label (globally)

2018-05-18 Thread DK Singh
Thank U  Christian,

It worked now after transformation i was writing the file into filesystem
using file:write() so i defined the third parameter there  map { "method":
"xml", 'indent':no }

again Thank U so much

Regards
Dharmendra Kumar Singh

On Fri, May 18, 2018 at 5:43 PM, Christian Grün <christian.gr...@gmail.com>
wrote:

> hi
> ​
> Dharmendra,
>
> Maybe your database contains whitespace text nodes? If it does, these
> whitespaces will simply be returned as part of your document. Only if it
> doesn’t, the "indent" parameter will add new whitespaces [1].
>
> You can count the number of these text nodes with the following query:
>
>   count(
> for $text in db:open('db')//text()
> where normalize-space($text) = ''
> return $text
>   )
>
> Or (shorter):
>
> count(db:open('db')//text()[not(normalize-space())])
>
> If your database has no whitespace-only nodes, you might need to provide
> us with a step-by-step description.
>
> Best,
> Christian
>
> [1] https://www.w3.org/TR/xslt-xquery-serialization-31/#xml-indent
>
>
>
>
> On Fri, May 18, 2018 at 1:57 PM, DK Singh <dharam.m...@gmail.com> wrote:
>
>> Thanks U Christian,
>>
>> I  have done as you suggested  but problem is still there XML getting
>> indent, after setting i had re-started the HTTP service  and run the query
>> to transform the document after transformation XML getting indent.
>>
>> below is the setting snapshot
>>
>>
>>
>> Regards
>> Dharmendra Kumar Singh
>>
>> On Fri, May 18, 2018 at 4:35 PM, Christian Grün <
>> christian.gr...@gmail.com> wrote:
>>
>>> > I am using HTTP services so as i set chop false like
>>> >
>>> > 
>>> >   org.basex.chop
>>> >   false
>>> > 
>>> >
>>> > so in this format i have to set SERIALIZER = indent=no or other way in
>>> the
>>> > web.xml file.
>>>
>>> Exactly. Try this:
>>>
>>>   
>>> org.basex.serializer
>>> indent=no
>>>   
>>>
>>>
>>>
>>> > On Fri, May 18, 2018 at 3:50 PM, Christian Grün <
>>> christian.gr...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Hi Dharmendra Kumar,
>>> >>
>>> >> You can set this option globally by adding the line
>>> >>
>>> >> SERIALIZER = indent=no
>>> >>
>>> >> at the bottom of your .basex configuration file [1]. If you use HTTP
>>> >> services, you can add an entry to your web.xml file [2].
>>> >>
>>> >> Both solutions will affect all databases; there is currently no way to
>>> >> define serialization parameters for specific databases.
>>> >>
>>> >> Hope this helps,
>>> >> Christian
>>> >>
>>> >> [1] http://docs.basex.org/wiki/Options#SERIALIZER
>>> >> [2] http://docs.basex.org/wiki/Web_Application#Configuration
>>> >>
>>> >>
>>> >> On Fri, May 18, 2018 at 12:13 PM, DK Singh <dharam.m...@gmail.com>
>>> wrote:
>>> >> > Hi All,
>>> >> >
>>> >> > I have to set indent='no' at the database label how can i achieve
>>> this,
>>> >> > i
>>> >> > have gone thorough the  documentation and found that either we can
>>> do:
>>> >> > (1)
>>> >> > declare namespace output =
>>> >> > "http://www.w3.org/2010/xslt-xquery-serialization;;
>>> >> > declare option output:indent "no";
>>> >> >
>>> >> > but the problem is that all the XQUERY module i have library module
>>> so
>>> >> > it is
>>> >> > throwing error.
>>> >> > so is there any option.
>>> >> >
>>> >> > Regards
>>> >> >
>>> ​​
>>> Dharmendra Kumar Singh
>>> >> >
>>> >> >
>>> >
>>> >
>>>
>>
>>
>


Re: [basex-talk] Set indent no at database label (globally)

2018-05-18 Thread DK Singh
Thanks U Christian,

I  have done as you suggested  but problem is still there XML getting
indent, after setting i had re-started the HTTP service  and run the query
to transform the document after transformation XML getting indent.

below is the setting snapshot



Regards
Dharmendra Kumar Singh

On Fri, May 18, 2018 at 4:35 PM, Christian Grün <christian.gr...@gmail.com>
wrote:

> > I am using HTTP services so as i set chop false like
> >
> > 
> >   org.basex.chop
> >   false
> > 
> >
> > so in this format i have to set SERIALIZER = indent=no or other way in
> the
> > web.xml file.
>
> Exactly. Try this:
>
>   
> org.basex.serializer
> indent=no
>   
>
>
>
> > On Fri, May 18, 2018 at 3:50 PM, Christian Grün <
> christian.gr...@gmail.com>
> > wrote:
> >>
> >> Hi Dharmendra Kumar,
> >>
> >> You can set this option globally by adding the line
> >>
> >> SERIALIZER = indent=no
> >>
> >> at the bottom of your .basex configuration file [1]. If you use HTTP
> >> services, you can add an entry to your web.xml file [2].
> >>
> >> Both solutions will affect all databases; there is currently no way to
> >> define serialization parameters for specific databases.
> >>
> >> Hope this helps,
> >> Christian
> >>
> >> [1] http://docs.basex.org/wiki/Options#SERIALIZER
> >> [2] http://docs.basex.org/wiki/Web_Application#Configuration
> >>
> >>
> >> On Fri, May 18, 2018 at 12:13 PM, DK Singh <dharam.m...@gmail.com>
> wrote:
> >> > Hi All,
> >> >
> >> > I have to set indent='no' at the database label how can i achieve
> this,
> >> > i
> >> > have gone thorough the  documentation and found that either we can do:
> >> > (1)
> >> > declare namespace output =
> >> > "http://www.w3.org/2010/xslt-xquery-serialization;;
> >> > declare option output:indent "no";
> >> >
> >> > but the problem is that all the XQUERY module i have library module so
> >> > it is
> >> > throwing error.
> >> > so is there any option.
> >> >
> >> > Regards
> >> > Dharmendra Kumar Singh
> >> >
> >> >
> >
> >
>


Re: [basex-talk] Set indent no at database label (globally)

2018-05-18 Thread DK Singh
Hi Grun,

I am using HTTP services so as i set chop false like


  org.basex.chop
  false


so in this format i have to set SERIALIZER = indent=no or other way in the
web.xml file.


On Fri, May 18, 2018 at 3:50 PM, Christian Grün <christian.gr...@gmail.com>
wrote:

> Hi Dharmendra Kumar,
>
> You can set this option globally by adding the line
>
> SERIALIZER = indent=no
>
> at the bottom of your .basex configuration file [1]. If you use HTTP
> services, you can add an entry to your web.xml file [2].
>
> Both solutions will affect all databases; there is currently no way to
> define serialization parameters for specific databases.
>
> Hope this helps,
> Christian
>
> [1] http://docs.basex.org/wiki/Options#SERIALIZER
> [2] http://docs.basex.org/wiki/Web_Application#Configuration
>
>
> On Fri, May 18, 2018 at 12:13 PM, DK Singh <dharam.m...@gmail.com> wrote:
> > Hi All,
> >
> > I have to set indent='no' at the database label how can i achieve this, i
> > have gone thorough the  documentation and found that either we can do:
> > (1)
> > declare namespace output =
> > "http://www.w3.org/2010/xslt-xquery-serialization;;
> > declare option output:indent "no";
> >
> > but the problem is that all the XQUERY module i have library module so
> it is
> > throwing error.
> > so is there any option.
> >
> > Regards
> > Dharmendra Kumar Singh
> >
> >
>


[basex-talk] Set indent no at database label (globally)

2018-05-18 Thread DK Singh
Hi All,

I have to set indent='no' at the database label how can i achieve this, i
have gone thorough the  documentation and found that either we can do:
(1)
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization

";
declare option output:indent "no";

but the problem is that all the XQUERY module i have library module so it
is throwing error.
so is there any option.

Regards
Dharmendra Kumar Singh


[basex-talk] Implement read lock and write lock

2017-08-17 Thread DK Singh
Hi All,

How can i implement read lock and write lock,  any functions to do this

Regards
Dharmendra Kumar Singh


Re: [basex-talk] Save XMLs into filesystem from DB

2017-07-06 Thread DK Singh
Thanks for your reply Kristian

So I gone through the documentation and I found that function file:write
take parameters path and item so first parameters I am passing the local
directory path where documents has to be saved and second argument I am
passing the item

It will be very helpful if you provide the example

On 06-Jul-2017 11:27 PM, "Kristian Kankainen"  wrote:

> You only provide a path to file:write whichbgets overwritten by each
> for-loop, so you end up with just one file with the contents of the last
> run of the for-loop. You should instead provide a file name for each file
> you want to write.
> 6. juuli 2017 1:42 PM kirjutas kuupäeval Dharmendra Singh <
> dharam.m...@gmail.com>:
>
> Hi All ,
>
> i have to save the XMLs files from  the DB but i am not able to do that
> below is my code, this code is generating only one kb file  so can any one
> tell me where i am doing wrong
>
> let $localpath := 'D:/2017/doctest/xmls'
> for $xmls in db:open('test')
>
> return file:write($localpath,$xmls,map{"method": "xml"})
>
> Note: i am able to do using import command but i don't have to copy all
> data from the DB i have to copy by URI
>
>
> Thanks & Regards
>
> Dharmendra Kumar Singh
>
>