Re: [Xsltforms-support] Problems with instance namespace and xsi:type
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2012-11-08 06:39:52
|
Hi Elias, Is it possible for you to send me a test form? Thanks! -Alain Le 05/11/2012 23:29, Elias Mazur a écrit : > Hi Alain. > > I added a prefix on the instance as you suggested and still gives me > the same message. From what I understand, xsi:type allows you to bind > an element outside the default namespace. My instance starts with the > <Document> element and it defines the instance namespace xsi and > xsi:schemaLocation which should resolve xsi:type , at least I think > that's the theory behind it. It validates fine, but I can't get it to > work with XSLTForms. Any suggestion is greatly appreciated. > > Thanks > Elias > > On Thu, Nov 1, 2012 at 11:20 AM, Alain Couthures > <ala...@ag... <mailto:ala...@ag...>> > wrote: > > 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 >> Xsl...@li... <mailto:Xsl...@li...> >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > |