problem using for loop in function
Oxygen general issues.
-
- Posts: 1
- Joined: Fri Jul 31, 2009 11:46 am
problem using for loop in function
Hello,
I am trying to access a secondary source document from within a Xquery function. As follows:
-------------------------------------
declare function kzf:make-observations2 ($recipient as element(*,v1:CaregroupcourseParticipant))
as element(hl7:component)* {
for $i in (doc("file:///C:/HISKIS/exe/CIM/v2/wsdls/EvT v0.3.xml")/messageComposition/messageDef)
return
<component>
<observation classCode="OBS" moodCode="EVN">
<id root="1.2.34.5.7968694845657694"/>
<code code="{data($i/id/@extension)}" codeSystem="2.16.840.1.113883.6.1" displayName="Bloedglucosewaarden nuchter"/>
<effectiveTime value="200904021044"/>
<value xsi:type="PQ" value="5.5" unit="mmol/l"/>
</observation>
</component>
};
------------------------------------
This code is validated succesfully and executed however the code attribute value remains empty "".
If I extract this code and execute it in (main)standalone xquery file it gives the results I expect.
What am I missing out here ?
any suggestions ?
Thanks
Peter Geerts
I am trying to access a secondary source document from within a Xquery function. As follows:
-------------------------------------
declare function kzf:make-observations2 ($recipient as element(*,v1:CaregroupcourseParticipant))
as element(hl7:component)* {
for $i in (doc("file:///C:/HISKIS/exe/CIM/v2/wsdls/EvT v0.3.xml")/messageComposition/messageDef)
return
<component>
<observation classCode="OBS" moodCode="EVN">
<id root="1.2.34.5.7968694845657694"/>
<code code="{data($i/id/@extension)}" codeSystem="2.16.840.1.113883.6.1" displayName="Bloedglucosewaarden nuchter"/>
<effectiveTime value="200904021044"/>
<value xsi:type="PQ" value="5.5" unit="mmol/l"/>
</observation>
</component>
};
------------------------------------
This code is validated succesfully and executed however the code attribute value remains empty "".
If I extract this code and execute it in (main)standalone xquery file it gives the results I expect.
What am I missing out here ?
any suggestions ?
Thanks
Peter Geerts
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: problem using for loop in function
Post by sorin_ristache »
Hello,
Post a complete XQuery that includes calling the function kzf:make-observations2 and the file EvT v0.3.xml for reproducing the problem.
Regards,
Sorin
Post a complete XQuery that includes calling the function kzf:make-observations2 and the file EvT v0.3.xml for reproducing the problem.
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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