Hello Elias,

Welcome to XSLTForms support list!

I suspect a namespace issue: there is no prefix in your example and XForms assumes that the default namespace to be its own.

Is it possible for you to add a prefix in your instance, at least just for test purposes?

Thank you for your feedbacks!

-Alain

Le 01/11/2012 16:09, Elias Mazur a écrit :
Hi.

I'm trying to create an instance that has an xsi:type attribute. The instance defines the xsi namespace and xsi:schemaLocation at the root element as follows:

<Document xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="urn:hl7-org:v3 http://localhost:8080/exist/rest/db/studydata/schemas/StudyDesign.xsd"; classCode="DOCCLIN" moodCode="EVN">

and the node that is breaking is the <effectiveTime> with the xsi:type attribute:

<component3 typeCode="COMP">
   <substanceAdministration classCode="SBADM" moodCode="DEF">
    <effectiveTime xsi:type="PIVL_TS">
      <period value="1" unit="day"/>
    </effectiveTime>
    <routeCode code="xxxx" displayName="ORAL" codeSystem="1.22.3.3"/>
    <doseQuantity value="0.625" unit="mg"/>
    <consumable typeCode="CSM" xsi:nil="true"/>
   </substanceAdministration>
</component3>

The XML validates fine against the instance schema in the xsi definition using XML spy as well as the xquery validate eXist functions (JAXP, JAXV and JING). Environment is eXist database, Xquery.

Problem:  when I try to create the instance as follows:

<xf:model id="hl7-message">
<xf:instance id="sd-model" src="http://localhost:8080/exist/rest/db/studydata/instances/studydesign-model.xml"; />
</xf:model>

I get a "Message from webpage" pop error message (see attached):

"Type PIVL_TS not defined in namespace
http://www.w3.org/2002/xforms";

The complex type PIVL_TS is defined in one of the schemas included in "StudyDesign.xsd" defined in xsi:schemaLocation.

Any help is appreciated.

Thanks
Elias


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct


_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to