Syntax for ${xpath_eval} and xpath function document() for external documents (URL, ${cfdu}, parent folder)
Posted: Wed Jan 27, 2021 5:47 pm
Hello everyone!
After a long time without question, here I am again. Thank you so much for all the help that you have already provided to me and others! The present question stems from the same needs as topic19849.html. The problem was solved as suggested by Sorin with AuthorOperation, which I did and it worked perfectly. Again, congratulations for the insights and explanations you can provide
In my actual environment, I am working in a large file with several sections. At the top of the file, there is an <include/> element (<include xmlns="http://www.w3.org/2001/XInclude" href="biblio.xml"/>.
In this environment, several Author Mode Operations allow
(1) to insert a <bibl/> element,
(2) add a @sameAs attribute with value provided with ${ask},
(3) retrieve all references xml:ids for references containing the value in the reference list "biblio.xml",
(4) displaying the references and selecting the one that is needed.
Operation (3) is based on ChangeAttributeOperation with following value:
Now, I have divided the large initial file into smaller ones. Instead of including the reference list with <include/> in each of the smaller files, I would like to retrieve reference ids from an independent file. I have tried three methods, but failed and I do not know if my syntax is incorrect or if I have an issue with the "document()" function.
Option A: URL and authorizations
I have tried several paramaters, with double and simple quotes and additional ${xpath_eval) for the document() function, but I cannot find how to call the external document based on a parameter like the following one:
On the top of that, the SVN is protected by login/password. Is it possible to include these within the xpath_eval function?
Option B: ${cfdu}
The same in trying to call the document directly in the folder with the ${cfdu} parameter
Is it an issue with quotes or with document() function?
Option C : parent folder
Is it possible to point to the parent folder, either with "../${cfdu}" or with a substring-before function like, in this case
(and then the same $xpath_eval as in Option B.
Is there a way forward? Hope this is clear and within the scope. Thank you again so much for your support,
Dominique
After a long time without question, here I am again. Thank you so much for all the help that you have already provided to me and others! The present question stems from the same needs as topic19849.html. The problem was solved as suggested by Sorin with AuthorOperation, which I did and it worked perfectly. Again, congratulations for the insights and explanations you can provide
In my actual environment, I am working in a large file with several sections. At the top of the file, there is an <include/> element (<include xmlns="http://www.w3.org/2001/XInclude" href="biblio.xml"/>.
In this environment, several Author Mode Operations allow
(1) to insert a <bibl/> element,
(2) add a @sameAs attribute with value provided with ${ask},
(3) retrieve all references xml:ids for references containing the value in the reference list "biblio.xml",
(4) displaying the references and selecting the one that is needed.
Operation (3) is based on ChangeAttributeOperation with following value:
Code: Select all
${xpath_eval(//biblStruct[contains(., "${xpath_eval(./@sameAs)}")]/concat("#", @xml:id))}
Option A: URL and authorizations
I have tried several paramaters, with double and simple quotes and additional ${xpath_eval) for the document() function, but I cannot find how to call the external document based on a parameter like the following one:
Code: Select all
${xpath_eval(document(https://gestion-projets.irht.cnrs.fr/svn/st-omer/sources/catalogues/notices/biblio.xml)//biblStruct[contains(., "${xpath_eval(./@sameAs)}")]/concat("#", @xml:id))}
Option B: ${cfdu}
The same in trying to call the document directly in the folder with the ${cfdu} parameter
Code: Select all
${xpath_eval(document(${xpath_eval(concat(${cfdu}, "/biblio.xml"))})//biblStruct[contains(., "${xpath_eval(./@sameAs)}")]/concat("#", @xml:id))}
Option C : parent folder
Is it possible to point to the parent folder, either with "../${cfdu}" or with a substring-before function like, in this case
Code: Select all
document(concat(substring-before('${cfdu}', '/notices'), '/biblio.xml'))
Is there a way forward? Hope this is clear and within the scope. Thank you again so much for your support,
Dominique