call-xpl() error - prefix xxforms has not been declared

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

call-xpl() error - prefix xxforms has not been declared

tgra
Hello

I would like to use the xxforms:call-xpl() function as described on the Orbeon website:
http://wiki.orbeon.com/forms/how-to/logic/execute-xslt-from-xforms

The XForms below  that includes the call-xpl() function generates an error stating that the prefix xxforms has not been declared.

code:
   <xforms:trigger>
                        <xforms:label>Display input form fields</xforms:label>
                        <xforms:action xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="DOMActivate">
                            <xforms:insert nodeset="instance('instance-report')//MIIDI/researchObject[index('MIIDIresearchObject')]" origin="xxforms:call-xpl('choice-replace.xpl', 'instance', instance('instance-report'), 'data')"/>
                        </xforms:action>
                    </xforms:trigger>
error:

XPath syntax error at char 88 in {...port'), 'data') xmlns:xxfor...}:
Prefix xxforms has not been declared
Resource URL Line Column Description XML Element
oxf:/ops/xforms/xforms-server.xpl 55 65
reading processor output
name → response
id → xforms-response
        <p:output name="response" id="xforms-response"/>

I would just like to ask if my use of call-xpl is correct, and if so, why the error might occur.

thank you for any help with this
Tanya



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: call-xpl() error - prefix xxforms has not been declared

Hank Ratzesberger-3
Hi Tanya,

As with any namespace, it must be declared in scope:

xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"

see:

http://wiki.orbeon.com/forms/doc/developer-guide/xml-namespaces

Cheers,
Hank

2011/7/28 Tanya Gray <[hidden email]>
Hello

I would like to use the xxforms:call-xpl() function as described on the Orbeon website:
http://wiki.orbeon.com/forms/how-to/logic/execute-xslt-from-xforms

The XForms below  that includes the call-xpl() function generates an error stating that the prefix xxforms has not been declared.

code:
  <xforms:trigger>
                       <xforms:label>Display input form fields</xforms:label>
                       <xforms:action xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="DOMActivate">
                           <xforms:insert nodeset="instance('instance-report')//MIIDI/researchObject[index('MIIDIresearchObject')]" origin="xxforms:call-xpl('choice-replace.xpl', 'instance', instance('instance-report'), 'data')"/>
                       </xforms:action>
                   </xforms:trigger>
error:

XPath syntax error at char 88 in {...port'), 'data') xmlns:xxfor...}:
Prefix xxforms has not been declared
Resource URL    Line    Column  Description     XML Element
oxf:/ops/xforms/xforms-server.xpl       55      65
reading processor output
name → response
id → xforms-response
       <p:output name="response" id="xforms-response"/>

I would just like to ask if my use of call-xpl is correct, and if so, why the error might occur.

thank you for any help with this
Tanya



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Hank Ratzesberger
XMLWerks.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: call-xpl() error - prefix xxforms has not been declared

tgra


Hank, thank you for your reply, however, xxforms is declared in the relevant location in my XPL file e.g. XSLT stylesheet, XPL config element.

The error message mentions oxf:/ops/xforms/xforms-server.xpl  - is this relevant, or would it help to identify the source of the problem?

thank you
Tanya

Relevant code:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
        xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" xmlns:xu="http://www.xmldb.org/xupdate"
        xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:saxon="http://saxon.sf.net/"
        xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:foaf="http://xmlns.com/foaf/0.1/"
        xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:v="http://orbeon.org/oxf/xml/validation"
        xmlns:xforms="http://www.w3.org/2002/xforms"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
       
        >

...
<p:processor name="oxf:unsafe-xslt">
<p:input name="data" href="#instance-report" />
                <p:input name="instance-report" href="#instance-report" />
                <p:input name="instance-attributes" href="#instance-attributes" />
                <p:input name="instance-validation" href="instance-validation.xml" />
                <p:input name="ncbo-apikey" href="#ncbo-apikey"/>
                <p:input name="config" >
                                <xsl:stylesheet version="2.0"
                                xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
                                xmlns:xforms='http://www.w3.org/2002/xforms' xmlns:xhtml='http://www.w3.org/1999/xhtml'
                                xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
                                xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:miidi="http://miidi.org/miidi"
                                xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:biblio="http://example.org/biblio/0.1"
                                xmlns:cc="http://creativecommons.org/ns" xmlns:dbp="http://dbpedia.org/property/"
                                xmlns:dbr="http://dbpedia.org/resource/" xmlns:ex="http://example.org/"
                                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema"
                                xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:xhv="http://www.w3.org/1999/xhtml/vocab"
                                xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xi="http://www.w3.org/2001/XInclude"
                                xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
                                exclude-result-prefixes="xforms saxon xhtml ev fr xi xxforms p oxf xu miidi xdb"
                               
                                >

...
<xsl:template match='*' mode='element'>
 <xforms:insert nodeset="instance('instance-report')/{$repeat-nodeset}"
               origin="xxforms:call-xpl('choice-replace.xpl', 'instance', instance('instance-report'), 'data')"  />
 
</xsl:template>





----------------------------------------------------------------------------------------
Tanya Gray
Computing Officer - Semantic Web Data Management
email: [hidden email]   tel: +44-(0)1865-271234

Dryad UK       http://datadryad.org/dryaduk
MIIDI               http://www.miidi.org

Image Bioinformatics Research Group, Department of Zoology,
University of Oxford, South Parks Road, Oxford OX1 3PS, UK
________________________________________
From: Hank Ratzesberger [[hidden email]]
Sent: 28 July 2011 22:09
To: [hidden email]
Subject: [ops-users] Re: call-xpl() error - prefix xxforms has not been declared

Hi Tanya,

As with any namespace, it must be declared in scope:

xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"

see:

http://wiki.orbeon.com/forms/doc/developer-guide/xml-namespaces

Cheers,
Hank

2011/7/28 Tanya Gray <[hidden email]<mailto:[hidden email]>>
Hello

I would like to use the xxforms:call-xpl() function as described on the Orbeon website:
http://wiki.orbeon.com/forms/how-to/logic/execute-xslt-from-xforms

The XForms below  that includes the call-xpl() function generates an error stating that the prefix xxforms has not been declared.

code:
  <xforms:trigger>
                       <xforms:label>Display input form fields</xforms:label>
                       <xforms:action xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="DOMActivate">
                           <xforms:insert nodeset="instance('instance-report')//MIIDI/researchObject[index('MIIDIresearchObject')]" origin="xxforms:call-xpl('choice-replace.xpl', 'instance', instance('instance-report'), 'data')"/>
                       </xforms:action>
                   </xforms:trigger>
error:

XPath syntax error at char 88 in {...port'), 'data') xmlns:xxfor...}:
Prefix xxforms has not been declared
Resource URL    Line    Column  Description     XML Element
oxf:/ops/xforms/xforms-server.xpl       55      65
reading processor output
name → response
id → xforms-response
       <p:output name="response" id="xforms-response"/>

I would just like to ask if my use of call-xpl is correct, and if so, why the error might occur.

thank you for any help with this
Tanya



--
You receive this message as a subscriber of the [hidden email]<mailto:[hidden email]> mailing list.
To unsubscribe: mailto:[hidden email]<mailto:[hidden email]>
For general help: mailto:[hidden email]<mailto:[hidden email]>?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Hank Ratzesberger
XMLWerks.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: call-xpl() error - prefix xxforms has not been declared

Hank Ratzesberger-3
Hi Tanya,

Do you have a model and view?  Do you create an xhtml+xforms page using xslt in the model?

Generally, the model part of the page-flow only transforms the data, but with no view attribute, it
can create the whole page as xhtml or xforms.  However, while the xxforms functions are available 
in xforms, I cannot confirm that the functions are available in xslt, even the unsafe-xslt processor.  

If you intend the function to run by xforms processing, then you would have to create the attribute,
not declare it such that the xslt processor attempts to evaluate it. e.g.

<xsl:element name="xforms:insert">
  <xsl:attribute name="nodeset"><xsl:text>instance('instance-report')/{$repeat-nodeset}"</xsl:text></xsl:attribute>
  <xsl:attribute name="origin"><xsl:text>xxforrms:call-xpl('choice-replace.xpl', 'instance', instance('instance-report'), 'data')"</xsl:text></xsl:attribute>
</xsl:element>

Or it might be possible/easier to create a variable and use it

<xsl:variable name="origin"><xsl:text>...</xsl:text></xsl:variable>
<xforms:insert origin="$origin" /> 

Can you also provide the portion of the page flow controller for this?

Thank you,
Hank


2011/7/29 Tanya Gray <[hidden email]>


Hank, thank you for your reply, however, xxforms is declared in the relevant location in my XPL file e.g. XSLT stylesheet, XPL config element.

The error message mentions oxf:/ops/xforms/xforms-server.xpl  - is this relevant, or would it help to identify the source of the problem?

thank you
Tanya

Relevant code:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
       xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" xmlns:xu="http://www.xmldb.org/xupdate"
       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:saxon="http://saxon.sf.net/"
       xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:foaf="http://xmlns.com/foaf/0.1/"
       xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:v="http://orbeon.org/oxf/xml/validation"
       xmlns:xforms="http://www.w3.org/2002/xforms"
       xmlns:xhtml="http://www.w3.org/1999/xhtml"

       >

...
<p:processor name="oxf:unsafe-xslt">
<p:input name="data" href="#instance-report" />
               <p:input name="instance-report" href="#instance-report" />
               <p:input name="instance-attributes" href="#instance-attributes" />
               <p:input name="instance-validation" href="instance-validation.xml" />
               <p:input name="ncbo-apikey" href="#ncbo-apikey"/>
               <p:input name="config" >
                               <xsl:stylesheet version="2.0"
                               xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
                               xmlns:xforms='http://www.w3.org/2002/xforms' xmlns:xhtml='http://www.w3.org/1999/xhtml'
                               xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
                               xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:miidi="http://miidi.org/miidi"
                               xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:biblio="http://example.org/biblio/0.1"
                               xmlns:cc="http://creativecommons.org/ns" xmlns:dbp="http://dbpedia.org/property/"
                               xmlns:dbr="http://dbpedia.org/resource/" xmlns:ex="http://example.org/"
                               xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema"
                               xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:xhv="http://www.w3.org/1999/xhtml/vocab"
                               xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xi="http://www.w3.org/2001/XInclude"
                               xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
                               exclude-result-prefixes="xforms saxon xhtml ev fr xi xxforms p oxf xu miidi xdb"

                               >

...
<xsl:template match='*' mode='element'>
 <xforms:insert nodeset="instance('instance-report')/{$repeat-nodeset}"
              origin="xxforms:call-xpl('choice-replace.xpl', 'instance', instance('instance-report'), 'data')"  />

</xsl:template>





----------------------------------------------------------------------------------------
Tanya Gray
Computing Officer - Semantic Web Data Management
email: [hidden email]   tel: <a href="tel:%2B44-%280%291865-271234" value="+441865271234">+44-(0)1865-271234

Dryad UK       http://datadryad.org/dryaduk
MIIDI               http://www.miidi.org

Image Bioinformatics Research Group, Department of Zoology,
University of Oxford, South Parks Road, Oxford OX1 3PS, UK
________________________________________
From: Hank Ratzesberger [[hidden email]]
Sent: 28 July 2011 22:09
To: [hidden email]
Subject: [ops-users] Re: call-xpl() error - prefix xxforms has not been declared

Hi Tanya,

As with any namespace, it must be declared in scope:

xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"

see:

http://wiki.orbeon.com/forms/doc/developer-guide/xml-namespaces

Cheers,
Hank

2011/7/28 Tanya Gray <[hidden email]<mailto:[hidden email]>>
Hello

I would like to use the xxforms:call-xpl() function as described on the Orbeon website:
http://wiki.orbeon.com/forms/how-to/logic/execute-xslt-from-xforms

The XForms below  that includes the call-xpl() function generates an error stating that the prefix xxforms has not been declared.

code:
 <xforms:trigger>
                      <xforms:label>Display input form fields</xforms:label>
                      <xforms:action xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="DOMActivate">
                          <xforms:insert nodeset="instance('instance-report')//MIIDI/researchObject[index('MIIDIresearchObject')]" origin="xxforms:call-xpl('choice-replace.xpl', 'instance', instance('instance-report'), 'data')"/>
                      </xforms:action>
                  </xforms:trigger>
error:

XPath syntax error at char 88 in {...port'), 'data') xmlns:xxfor...}:
Prefix xxforms has not been declared
Resource URL    Line    Column  Description     XML Element
oxf:/ops/xforms/xforms-server.xpl       55      65
reading processor output
name → response
id → xforms-response
      <p:output name="response" id="xforms-response"/>

I would just like to ask if my use of call-xpl is correct, and if so, why the error might occur.

thank you for any help with this
Tanya



--
You receive this message as a subscriber of the [hidden email]<mailto:[hidden email]> mailing list.
To unsubscribe: mailto:[hidden email]<mailto:[hidden email]>
For general help: mailto:[hidden email]<mailto:[hidden email]>?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Hank Ratzesberger
XMLWerks.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Hank Ratzesberger
XMLWerks.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws