How to associate XML documents with declared external vars?
Are you missing a feature? Request its implementation here.
-
- Posts: 11
- Joined: Mon Jul 30, 2007 6:19 pm
- Location: Charlotte, NC USA
How to associate XML documents with declared external vars?
I have the following fragment in my xquery file:
declare variable $legalcodes as document-node() external;
What do I do in Oxygen xml editor to configure this external variable to point to an xml file?
Thanks,
Radu Marian
declare variable $legalcodes as document-node() external;
What do I do in Oxygen xml editor to configure this external variable to point to an xml file?
Thanks,
Radu Marian
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
oXygen does not support the external variables of type "document-node". I filed an enhancement request for this.
An workaround would be to create a new external variable of type xs:string, and then
assign to the $legalcodes variable the evaluation of the doc() function.
Something like this:
declare variable $x as xs:string external;
declare variable $y as document-node() := doc($x);
Thank you for the report,
Dan Caprioara
An workaround would be to create a new external variable of type xs:string, and then
assign to the $legalcodes variable the evaluation of the doc() function.
Something like this:
declare variable $x as xs:string external;
declare variable $y as document-node() := doc($x);
Thank you for the report,
Dan Caprioara
-
- Posts: 11
- Joined: Mon Jul 30, 2007 6:19 pm
- Location: Charlotte, NC USA
Dan,
Thanks for your reply. It makes sense.
I still have a question - how do I configure the oxygen scenario to point the variable $legalcodesString to an xml file? I have tried adding a parameter as:
$legalcodesString = ${cfd}/../xml/legalcodes.xml
and still get the error: No value supplied for required parameter $legalcodesString
Do you have any sample code and scenario?
Thanks,
Radu.
Thanks for your reply. It makes sense.
I still have a question - how do I configure the oxygen scenario to point the variable $legalcodesString to an xml file? I have tried adding a parameter as:
$legalcodesString = ${cfd}/../xml/legalcodes.xml
and still get the error: No value supplied for required parameter $legalcodesString
Do you have any sample code and scenario?
Thanks,
Radu.
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Let's consider the XQuery expression:
To run it you should select from the Transformation Configuration Dialog the "Execute XQuery" scenario. Press edit, then press the "Parameters" button in the new dialog. Add the parameter "x" with the value corresponding tot the name of the xml file.
Code: Select all
declare variable $x as xs:string external;
declare variable $y as document-node() := doc($x);
<test>{
for $a in $y/*
return
<element>
{$a}
</element>
}
</test>
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service