From: Adam R. <ad...@ex...> - 2011-10-04 21:18:14
|
Yes. You should study the code for file:serialize(...) its in $EXIST_HOME/extensions/modules/src/org/exist/xquery/modules/file/SerializeToFile.java On 30 September 2011 12:27, Federico De Maddalena <fed...@gm...>wrote: > ok, i've realized the problem. > the last question: is possible to convert the in-memory node in a file > stored in file system, using java? > eg a function that has as argument a node, and the output is a file > with the content of the node. > if yes, what classes i've to use? I see memtreebuilder...but it's not > specified how to use methods... > > 2011/9/28 Adam Retter <ad...@ex...>: > > $a is the output of the transformation, it will be of type > document-node() > > but there is no useful URI because this document only exists in the > memory > > of the processor at this point, you would have to call xmldb:store(...) > to > > get a persistent URI for it. > > > > On 28 September 2011 19:29, Federico De Maddalena < > fed...@gm...> > > wrote: > >> > >> I think $a is a type.doc > >> is possible to obtain the uri of $a? > >> > >> 2011/9/28 Adam Retter <ad...@ex...>: > >> > From the XQuery snippet you sent over most recently, it seems that $a > is > >> > an > >> > in-memory node. So I dont really understand what you are asking? > >> > > >> > On 28 September 2011 13:33, Federico De Maddalena > >> > <fed...@gm...> > >> > wrote: > >> >> > >> >> probably the error is that I read the argument $a in the wrong way. > >> >> how can I know the exactly URL of $a? or the URL of any function > >> >> parameter > >> >> > >> >> 2011/9/22 Adam Retter <ad...@ex...>: > >> >> > There is no schematron:schema(...) function in the eXist-db code > base > >> >> > as far as I can see, so this must be something that you have built > or > >> >> > someone has provided to you. This function could do anything and we > >> >> > have no idea about this, so I am not sure how we can help you with > >> >> > this, unless you want to open source the code for the function and > >> >> > have it added to the eXist-db code base. > >> >> > > >> >> > On 21 September 2011 22:38, Federico De Maddalena > >> >> > <fed...@gm...> wrote: > >> >> >> this row is from transform function and this function works. > >> >> >> I think the problem is the row below > >> >> >> > >> >> >> declare namespace transform='http://exist-db.org/xquery/transform > '; > >> >> >> let $a := > >> >> >> > >> >> >> > transform:transform(doc('xmldb:exist:///file_di_esempio/tpl/valid_ex_book.xml'), > >> >> >> doc('xmldb:exist:///file_di_esempio/tpl2sch.xsl'), ()) > >> >> >> let $b := > >> >> >> > >> >> >> > schematron:schema('xmldb:exist:///file_di_esempio/doc/valid_doc_book_divina_commedia.xml', > >> >> >> $a) > >> >> >> return $b > >> >> >> > >> >> >> in fact if I wrote return $a after transform function, the result > is > >> >> >> correct. > >> >> >> $a is a doc? item? I don't know what type return function > transform. > >> >> >> thanks for helping me > >> >> >> > >> >> >> 2011/9/21 Dannes Wessels <di...@ex...>: > >> >> >>> > >> >> >>> On 21 sep. 2011, at 14:20, Federico De Maddalena > >> >> >>> <fed...@gm...> wrote: > >> >> >>> > >> >> >>>> doc('xmldb:exist:///file_di_esempio/tpl/valid_ex_book.xml') > >> >> >>> > >> >> >>> I don't recognize this, try either doc('/db/path/doc.xml') of > >> >> >>> doc(xs:anyURI('......')) > >> >> >>> > >> >> >>> Cheers > >> >> >>> > >> >> >>> Dannes > >> >> >> > >> >> >> > >> >> >> > >> >> >> > ------------------------------------------------------------------------------ > >> >> >> All the data continuously generated in your IT infrastructure > >> >> >> contains > >> >> >> a > >> >> >> definitive record of customers, application performance, security > >> >> >> threats, fraudulent activity and more. Splunk takes this data and > >> >> >> makes > >> >> >> sense of it. Business sense. IT sense. Common sense. > >> >> >> http://p.sf.net/sfu/splunk-d2dcopy1 > >> >> >> _______________________________________________ > >> >> >> Exist-open mailing list > >> >> >> Exi...@li... > >> >> >> https://lists.sourceforge.net/lists/listinfo/exist-open > >> >> >> > >> >> > > >> >> > > >> >> > > >> >> > -- > >> >> > Adam Retter > >> >> > > >> >> > eXist Developer > >> >> > { United Kingdom } > >> >> > ad...@ex... > >> >> > irc://irc.freenode.net/existdb > >> >> > > >> > > >> > > >> > > >> > -- > >> > Adam Retter > >> > > >> > eXist Developer > >> > { United Kingdom } > >> > ad...@ex... > >> > irc://irc.freenode.net/existdb > >> > > > > > > > > > -- > > Adam Retter > > > > eXist Developer > > { United Kingdom } > > ad...@ex... > > irc://irc.freenode.net/existdb > > > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |