difference between @value and @ref on xforms:output

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

difference between @value and @ref on xforms:output

Ryan Puddephatt
All,
    I have noticed that from @value you cannot access the default instance through /root-node/element you have to use instance('main-instance')/element. Is this for a reason or a bug?
 
Thanks
 
Ryan

Ryan Puddephatt
Software Engineer
 

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

OPS calling Google

Richard Braman-2
hello all,  i was researching the web service consumption features of
OPS and have run into a snag.  I tried to adapt the ca traffic web
service example into a google search example and am running into a snag
that I can figure out.  It seems like others have had the same error
using other soap client such as php and vba, but there was nothing on
the OPS list. the code follows the error message.  This code is free to
be resused by anyone once it works ;)

Error Message

SOAP Fault. Request: <?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soapenv:Body>
<m:doGoogleSearch xmlns:m="urn:GoogleSearch"> <key
xsd:type="xsd:string">P1Bf5AZQFHIXODGoxQ7kE7Vlqz3dbfBr</key> <q
xsd:type="xsd:string"/> <start xsd:type="xsd:int">1</start> <maxResults
xsd:type="xsd:int">10</maxResults> <filter xsd:type="xsd:boolean"/>
<safeSearch type="xsd:boolean">TRUE</safeSearch> <lr
xsd:type="xsd:string">lang_en</lr> <ie xsd:type="xsd:string"/> <oe
xsd:type="xsd:string"/> </m:doGoogleSearch> </soapenv:Body>
</soapenv:Envelope> Response: <?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body>
<SOAP-ENV:Fault> <faultcode>SOAP-ENV:Client</faultcode> <faultstring>No
Deserializer found to deserialize a ':key' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.</faultstring>
<faultactor>/search/beta2</faultactor> </SOAP-ENV:Fault>
</SOAP-ENV:Body> </SOAP-ENV:Envelope>


    OPS Call Stack

The OPS Call Stack helps you determine what sequence of OPS operations
have caused the error.

Resource URL Line Column Description XML Element
oxf:/model.xpl N/A N/A
       
oxf:/model.xpl 49 50 reading processor output (name='data',
id='call')  <p:output name="data" id="call"/>
oxf:/model.xpl 62 51 reading processor output (name='data',
ref='data')  <p:output name="data" ref="data"/>



model.xpl

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
    xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
    xmlns:oxf="http://www.orbeon.com/oxf/processors"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema">

    <p:param type="input" name="instance"/>
    <p:param type="output" name="data"/>

    <p:choose href="#instance"
xmlns:v="http://orbeon.org/oxf/xml/validation">
        <p:when test="//v:error">
            <p:processor name="oxf:identity">
                <p:input name="data">
                    <return>You didn't enter a query. Please try
again.</return>
                </p:input>
                <p:output name="data" ref="data"/>
            </p:processor>
        </p:when>
        <p:otherwise>
            <p:processor name="oxf:xslt">
                <p:input name="data" href="#instance"/>
                <p:input name="config">
                    <delegation:execute service="googlesearch"
operation="doGoogleSearch" xsl:version="2.0">
                        <key
xsi:type="xsd:string">XXXXXXXXXXXXXXXXXXXXXXXX</key>                        
                        <q xsi:type="xsd:string"><xsl:value-of
select="/query"/></q>
                        <start xsi:type="xsd:int">1</start>    
                        <maxResults xsi:type="xsd:int">10</maxResults>
                        <filter xsi:type="xsd:boolean"></filter>
                        <safeSearch type="xsd:boolean">TRUE</safeSearch>
                        <lr xsi:type="xsd:string">lang_en</lr>
                        <ie xsi:type="xsd:string"></ie>
                        <oe xsi:type="xsd:string"></oe>
                    </delegation:execute>
                </p:input>
                <p:output name="data" id="call"/>
            </p:processor>
            <p:processor name="oxf:delegation">
                <p:input name="interface">
                    <config>
                        <service id="googlesearch" type="webservice"
                            endpoint="http://api.google.com/search/beta2 ">
                            <operation name="doGoogleSearch"
nsuri="urn:GoogleSearch"/>
                        </service>
                    </config>
                </p:input>
                <p:input name="data"><dummy/></p:input>
                <p:input name="call" href="#call"/>
                <p:output name="data" ref="data"/>
            </p:processor>
        </p:otherwise>
    </p:choose>
</p:config>

view.xsl -XForm

<xhtml:html xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:xforms="http://www.w3.org/2002/xforms"
            xmlns:f="http://orbeon.org/oxf/xml/formatting"
            xmlns:xhtml="http://www.w3.org/1999/xhtml"
            xsl:version="2.0">
    <xhtml:head>
        <xhtml:title>Google Search</xhtml:title>
    </xhtml:head>
    <xhtml:body>
        <xforms:group>
            <xhtml:p>
                Enter a search:
                <xforms:input ref="/query"/>
                <xsl:text></xsl:text>
                <xforms:submit>
                    <xforms:label>Google Search</xforms:label>
                </xforms:submit>
            </xhtml:p>
        </xforms:group>
        <xsl:if test="doc('input:instance')/query != ''">
            <pre><xsl:value-of select="/return"/></pre>
        </xsl:if>
    </xhtml:body>
</xhtml:html>




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: OPS calling Google

Richard Braman-2
here is a couple posts where someone using a MS SOAP toolkit got the same error.  According to the poster the error is because of a type issue between Google and MSN (not suprising), but we are using Apache libs here so it is funny there is a problem. I found another post suggesting to use xsd:anyType instead of xsd:string and i tired that but same error.

http://www.threadwatch.org/node/3460#comment-22324

Also here is google's wsdl for those interested:

http://api.google.com/GoogleSearch.wsdl


Richard Braman wrote:
hello all,  i was researching the web service consumption features of
OPS and have run into a snag.  I tried to adapt the ca traffic web
service example into a google search example and am running into a snag
that I can figure out.  It seems like others have had the same error
using other soap client such as php and vba, but there was nothing on
the OPS list. the code follows the error message.  This code is free to
be resused by anyone once it works ;)

Error Message

SOAP Fault. Request: <?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soapenv:Body>
<m:doGoogleSearch xmlns:m="urn:GoogleSearch"> <key
xsd:type="xsd:string">P1Bf5AZQFHIXODGoxQ7kE7Vlqz3dbfBr</key> <q
xsd:type="xsd:string"/> <start xsd:type="xsd:int">1</start> <maxResults
xsd:type="xsd:int">10</maxResults> <filter xsd:type="xsd:boolean"/>
<safeSearch type="xsd:boolean">TRUE</safeSearch> <lr
xsd:type="xsd:string">lang_en</lr> <ie xsd:type="xsd:string"/> <oe
xsd:type="xsd:string"/> </m:doGoogleSearch> </soapenv:Body>
</soapenv:Envelope> Response: <?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body>
<SOAP-ENV:Fault> <faultcode>SOAP-ENV:Client</faultcode> <faultstring>No
Deserializer found to deserialize a ':key' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.</faultstring>
<faultactor>/search/beta2</faultactor> </SOAP-ENV:Fault>
</SOAP-ENV:Body> </SOAP-ENV:Envelope>


    OPS Call Stack

The OPS Call Stack helps you determine what sequence of OPS operations
have caused the error.

Resource URL 	Line 	Column 	Description 	XML Element
oxf:/model.xpl 	N/A 	N/A 	
	
oxf:/model.xpl 	49 	50 	reading processor output (name='data',
id='call') 	  <p:output name="data" id="call"/>
oxf:/model.xpl 	62 	51 	reading processor output (name='data',
ref='data') 	  <p:output name="data" ref="data"/>



model.xpl

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
    xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
    xmlns:oxf="http://www.orbeon.com/oxf/processors"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema">

    <p:param type="input" name="instance"/>
    <p:param type="output" name="data"/>

    <p:choose href="#instance"
xmlns:v="http://orbeon.org/oxf/xml/validation">
        <p:when test="//v:error">
            <p:processor name="oxf:identity">
                <p:input name="data">
                    <return>You didn't enter a query. Please try
again.</return>
                </p:input>
                <p:output name="data" ref="data"/>
            </p:processor>
        </p:when>
        <p:otherwise>
            <p:processor name="oxf:xslt">
                <p:input name="data" href="#instance"/>
                <p:input name="config">
                    <delegation:execute service="googlesearch"
operation="doGoogleSearch" xsl:version="2.0">
                        <key
xsi:type="xsd:string">XXXXXXXXXXXXXXXXXXXXXXXX</key>                        
                        <q xsi:type="xsd:string"><xsl:value-of
select="/query"/></q>
                        <start xsi:type="xsd:int">1</start>    
                        <maxResults xsi:type="xsd:int">10</maxResults>
                        <filter xsi:type="xsd:boolean"></filter>
                        <safeSearch type="xsd:boolean">TRUE</safeSearch>
                        <lr xsi:type="xsd:string">lang_en</lr>
                        <ie xsi:type="xsd:string"></ie>
                        <oe xsi:type="xsd:string"></oe>
                    </delegation:execute>
                </p:input>
                <p:output name="data" id="call"/>
            </p:processor>
            <p:processor name="oxf:delegation">
                <p:input name="interface">
                    <config>
                        <service id="googlesearch" type="webservice"
                            endpoint="http://api.google.com/search/beta2 ">
                            <operation name="doGoogleSearch"
nsuri="urn:GoogleSearch"/>
                        </service>
                    </config>
                </p:input>
                <p:input name="data"><dummy/></p:input>
                <p:input name="call" href="#call"/>
                <p:output name="data" ref="data"/>
            </p:processor>
        </p:otherwise>
    </p:choose>
</p:config>

view.xsl -XForm

<xhtml:html xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:xforms="http://www.w3.org/2002/xforms"
            xmlns:f="http://orbeon.org/oxf/xml/formatting"
            xmlns:xhtml="http://www.w3.org/1999/xhtml"
            xsl:version="2.0">
    <xhtml:head>
        <xhtml:title>Google Search</xhtml:title>
    </xhtml:head>
    <xhtml:body>
        <xforms:group>
            <xhtml:p>
                Enter a search:
                <xforms:input ref="/query"/>
                <xsl:text></xsl:text>
                <xforms:submit>
                    <xforms:label>Google Search</xforms:label>
                </xforms:submit>
            </xhtml:p>
        </xforms:group>
        <xsl:if test="doc('input:instance')/query != ''">
            <pre><xsl:value-of select="/return"/></pre>
        </xsl:if>
    </xhtml:body>
</xhtml:html>


  

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



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: OPS calling Google

Henrik Pettersen
In reply to this post by Richard Braman-2
Richard,

Can you post the original files along with the complete stacktrace as
attachemnts to this mailing list?

Thanks!

Henrik

On 9/1/06, Richard Braman <[hidden email]> wrote:

> hello all,  i was researching the web service consumption features of
> OPS and have run into a snag.  I tried to adapt the ca traffic web
> service example into a google search example and am running into a snag
> that I can figure out.  It seems like others have had the same error
> using other soap client such as php and vba, but there was nothing on
> the OPS list. the code follows the error message.  This code is free to
> be resused by anyone once it works ;)
>
> Error Message
>
> SOAP Fault. Request: <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soapenv:Body>
> <m:doGoogleSearch xmlns:m="urn:GoogleSearch"> <key
> xsd:type="xsd:string">P1Bf5AZQFHIXODGoxQ7kE7Vlqz3dbfBr</key> <q
> xsd:type="xsd:string"/> <start xsd:type="xsd:int">1</start> <maxResults
> xsd:type="xsd:int">10</maxResults> <filter xsd:type="xsd:boolean"/>
> <safeSearch type="xsd:boolean">TRUE</safeSearch> <lr
> xsd:type="xsd:string">lang_en</lr> <ie xsd:type="xsd:string"/> <oe
> xsd:type="xsd:string"/> </m:doGoogleSearch> </soapenv:Body>
> </soapenv:Envelope> Response: <?xml version="1.0" encoding="utf-8"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body>
> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Client</faultcode> <faultstring>No
> Deserializer found to deserialize a ':key' using encoding style
> 'http://schemas.xmlsoap.org/soap/encoding/'.</faultstring>
> <faultactor>/search/beta2</faultactor> </SOAP-ENV:Fault>
> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
>
>
>     OPS Call Stack
>
> The OPS Call Stack helps you determine what sequence of OPS operations
> have caused the error.
>
> Resource URL    Line    Column  Description     XML Element
> oxf:/model.xpl  N/A     N/A
>
> oxf:/model.xpl  49      50      reading processor output (name='data',
> id='call')        <p:output name="data" id="call"/>
> oxf:/model.xpl  62      51      reading processor output (name='data',
> ref='data')       <p:output name="data" ref="data"/>
>
>
>
> model.xpl
>
> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
>     xmlns:f="http://orbeon.org/oxf/xml/formatting"
> xmlns:xhtml="http://www.w3.org/1999/xhtml"
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>     xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
>     xmlns:oxf="http://www.orbeon.com/oxf/processors"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema">
>
>     <p:param type="input" name="instance"/>
>     <p:param type="output" name="data"/>
>
>     <p:choose href="#instance"
> xmlns:v="http://orbeon.org/oxf/xml/validation">
>         <p:when test="//v:error">
>             <p:processor name="oxf:identity">
>                 <p:input name="data">
>                     <return>You didn't enter a query. Please try
> again.</return>
>                 </p:input>
>                 <p:output name="data" ref="data"/>
>             </p:processor>
>         </p:when>
>         <p:otherwise>
>             <p:processor name="oxf:xslt">
>                 <p:input name="data" href="#instance"/>
>                 <p:input name="config">
>                     <delegation:execute service="googlesearch"
> operation="doGoogleSearch" xsl:version="2.0">
>                         <key
> xsi:type="xsd:string">XXXXXXXXXXXXXXXXXXXXXXXX</key>
>                         <q xsi:type="xsd:string"><xsl:value-of
> select="/query"/></q>
>                         <start xsi:type="xsd:int">1</start>
>                         <maxResults xsi:type="xsd:int">10</maxResults>
>                         <filter xsi:type="xsd:boolean"></filter>
>                         <safeSearch type="xsd:boolean">TRUE</safeSearch>
>                         <lr xsi:type="xsd:string">lang_en</lr>
>                         <ie xsi:type="xsd:string"></ie>
>                         <oe xsi:type="xsd:string"></oe>
>                     </delegation:execute>
>                 </p:input>
>                 <p:output name="data" id="call"/>
>             </p:processor>
>             <p:processor name="oxf:delegation">
>                 <p:input name="interface">
>                     <config>
>                         <service id="googlesearch" type="webservice"
>                             endpoint="http://api.google.com/search/beta2 ">
>                             <operation name="doGoogleSearch"
> nsuri="urn:GoogleSearch"/>
>                         </service>
>                     </config>
>                 </p:input>
>                 <p:input name="data"><dummy/></p:input>
>                 <p:input name="call" href="#call"/>
>                 <p:output name="data" ref="data"/>
>             </p:processor>
>         </p:otherwise>
>     </p:choose>
> </p:config>
>
> view.xsl -XForm
>
> <xhtml:html xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>             xmlns:xforms="http://www.w3.org/2002/xforms"
>             xmlns:f="http://orbeon.org/oxf/xml/formatting"
>             xmlns:xhtml="http://www.w3.org/1999/xhtml"
>             xsl:version="2.0">
>     <xhtml:head>
>         <xhtml:title>Google Search</xhtml:title>
>     </xhtml:head>
>     <xhtml:body>
>         <xforms:group>
>             <xhtml:p>
>                 Enter a search:
>                 <xforms:input ref="/query"/>
>                 <xsl:text></xsl:text>
>                 <xforms:submit>
>                     <xforms:label>Google Search</xforms:label>
>                 </xforms:submit>
>             </xhtml:p>
>         </xforms:group>
>         <xsl:if test="doc('input:instance')/query != ''">
>             <pre><xsl:value-of select="/return"/></pre>
>         </xsl:if>
>     </xhtml:body>
> </xhtml:html>
>
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: OPS calling Google

Richard Braman

The OPS Call Stack helps you determine what sequence of OPS operations have caused the error.

Resource URL

Line

Column

Description

XML Element

oxf:/model.xpl

N/A

N/A

 

 

oxf:/model.xpl

49

50

reading processor output (name='data', id='call')

  <p:output name="data" id="call"/>

oxf:/model.xpl

62

51

reading processor output (name='data', ref='data')

  <p:output name="data" ref="data"/>

oxf:/page-flow.xml

30

96

reading page model data output
reading page view data output
(page id='googlesearch', model='model.xpl', page id='googlesearch', view='view.xsl')

  <page id="googlesearch" path-info="/" xforms="form.xml" model="model.xpl" view="view.xsl"/>
  <page id="googlesearch" path-info="/" xforms="form.xml" model="model.xpl

Reply | Threaded
Open this post in threaded view
|

RE: OPS calling Google

Stephen Bayliss
In reply to this post by Richard Braman-2

Hi Richard

 

In your request, all of your xsd:type attributes should be xsi:type attributes (eg <key:xsd:type=”xsd:string”> should be <key xsi:type=”xsd:string”>)

 

(however once you’ve done that, you’ll get further errors… )

 

You might want to try using SoapUI (http://www.soapui.org/ ) as this will generate template SOAP requests, which you can then use to test calling services at a basic level before plugging them into OPS, it will help isolate errors in how you’re building your SOAP messages from any OPS bugs/errors.

 

Using that, and the parameters from your SOAP request from the OPS stack trace, I got as far as the following SOAP request, which gave me an “Invalid authorization key” message, which is at least expected!

 

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:GoogleSearch">

   <soapenv:Body>

      <urn:doGoogleSearch soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <key xsi:type="xsd:string">XXXXXXXXXXXX</key>

         <q xsi:type="xsd:string"/>

         <start xsi:type="xsd:int">1</start>

         <maxResults xsi:type="xsd:int">10</maxResults>

         <filter xsi:type="xsd:boolean"/>

         <restrict xsi:type="xsd:string"/>

         <safeSearch xsi:type="xsd:boolean">TRUE</safeSearch>

         <lr xsi:type="xsd:string">lang_en</lr>

         <ie xsi:type="xsd:string"/>

         <oe xsi:type="xsd:string"/>

      </urn:doGoogleSearch>

   </soapenv:Body>

</soapenv:Envelope>

 

Steve

 


From: Richard Braman [mailto:[hidden email]]
Sent: 01 September 2006 21:48
To: [hidden email]
Subject: RE: [ops-users] OPS calling Google

 

The OPS Call Stack helps you determine what sequence of OPS operations have caused the error.

Resource URL

Line

Column

Description

XML Element

oxf:/model.xpl

N/A

N/A

 

 

oxf:/model.xpl

49

50

reading processor output (name='data', id='call')

  <p:output name="data"

Reply | Threaded
Open this post in threaded view
|

RE: OPS calling Google

Richard Braman

Thanks steven,  It boiled down to 2 things.

 

  1. I had the incorrect namespcace URL for xsi should be

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance

this was causing the parameter coding to be wrong.

  1. I was missing a parameter is <delegation:execute>

<restrict xsi:type="xsd:string"></restrict>

 

Thanks for the pointer to soapuri .org.

I guess the next problem in the code is to have the results prettied up with a little XSL

 

Any thoughts or code on that would be appreciated, hopefully this can make it into Orbeon’s examples.

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: Friday, September 01, 2006 6:23 PM
To: [hidden email]
Subject: RE: [ops-users] OPS calling Google

 

Hi Richard

 

In your request, all of your xsd:type attributes should be xsi:type attributes (eg <key:xsd:type=”xsd:string”> should be <key xsi:type=”xsd:string”>)

 

(however once you’ve done that, you’ll get further errors… )

 

You might want to try using SoapUI (http://www.soapui.org/ ) as this will generate template SOAP requests, which you can then use to test calling services at a basic level before plugging them into OPS, it will help isolate errors in how you’re building your SOAP messages from any OPS bugs/errors.

 

Using that, and the parameters from your SOAP request from the OPS stack trace, I got as far as the following SOAP request, which gave me an “Invalid authorization key” message, which is at least expected!

 

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:GoogleSearch">

   <soapenv:Body>

      <urn:doGoogleSearch soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

         <key xsi:type="xsd:string">XXXXXXXXXXXX</key>

         <q xsi:type="xsd:string"/>

         <start xsi:type="xsd:int">1</start>

         <maxResults xsi:type="xsd:int">10</maxResults>

         <filter xsi:type="xsd:boolean"/>

         <restrict xsi:type="xsd:string"/>

         <safeSearch xsi:type="xsd:boolean">TRUE</safeSearch>

         <lr xsi:type="xsd:string">lang_en</lr>

         <ie xsi:type="xsd:string"/>

         <oe xsi:type="xsd:string"/>

      </urn:doGoogleSearch>

   </soapenv:Body>

</soapenv:Envelope>

 

Steve

 


From: Richard Braman [mailto:[hidden email]]
Sent: 01 September 2006 21:48
To: [hidden email]
Subject: RE: [ops-users] OPS calling Google

 

The OPS Call Stack helps you determine what sequence of OPS operations have caused the error.

Resource URL

Threaded

Open this post in threaded view
|

OPS SOAP RETURN VALUES

Richard Braman-2
I am a little confused about the return values from the model.xpl in the
Google SOAP sample I posted.

In the view.xsl, there is a stmt that prints out the response from the
SOAP call like this:

<xsl:if test="doc('input:instance')/query != ''">

<pre><xsl:value-of select="/return"/></pre>

</xsl:if>


Without being able to see I return, i cant figure out the XPath needed
to get to the elements of the response that I am interestd in for
formatting, namely
the snippet, URL, etc from the google response.

What would you use as an XPath?

Also does anyone think a WSDL to XPL generator would be a good idea for OPS?

Rich





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: OPS SOAP RETURN VALUES

Henrik Pettersen
Richard,

if you output your data in your xpl as instance data:
    <p:param name="instance" type="output" />

you need to reference this data in the view like this:
    <xforms:instance id="user-instance">
        <xsl:copy-of select="document('input:instance')"/>
    </xforms:instance>

if you output your data in your xpl as data:
    <p:param name="data" type="output" />

you need to reference this data in the view like this:
    <xforms:instance id="user-instance">
        <xsl:copy-of select="/"/>
    </xforms:instance>

Also, you can add the attribute 'debug="somename"' to any pipeline
component's <input> or <output> elements to print the content to the
log.

Hope that helps.

Henrik

On 9/2/06, Richard Braman <[hidden email]> wrote:

> I am a little confused about the return values from the model.xpl in the
> Google SOAP sample I posted.
>
> In the view.xsl, there is a stmt that prints out the response from the
> SOAP call like this:
>
> <xsl:if test="doc('input:instance')/query != ''">
>
> <pre><xsl:value-of select="/return"/></pre>
>
> </xsl:if>
>
>
> Without being able to see I return, i cant figure out the XPath needed
> to get to the elements of the response that I am interestd in for
> formatting, namely
> the snippet, URL, etc from the google response.
>
> What would you use as an XPath?
>
> Also does anyone think a WSDL to XPL generator would be a good idea for OPS?
>
> Rich
>
>
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: OPS SOAP RETURN VALUES

Stephen Bayliss
In reply to this post by Richard Braman-2
I'd recommend something along the same lines -- either use the debug attribute so you can see the SOAP response document, so you can figure out the XPath from that, or have a test page-flow entry (possibly with a test pipeline as well) so you can dump the response straight to the browser, or use SoapUI to test the call and view the response.

And yes, some kind of tool support for WSDL would be great!

Steve


-----Original Message-----
From: Henrik Pettersen [mailto:[hidden email]]
Sent: Sun 03-Sep-06 6:47 PM
To: [hidden email]
Subject: Re: [ops-users] OPS SOAP RETURN VALUES
 
Richard,

if you output your data in your xpl as instance data:
    <p:param name="instance" type="output" />

you need to reference this data in the view like this:
    <xforms:instance id="user-instance">
        <xsl:copy-of select="document('input:instance')"/>
    </xforms:instance>

if you output your data in your xpl as data:
    <p:param name="data" type="output" />

you need to reference this data in the view like this:
    <xforms:instance id="user-instance">
        <xsl:copy-of select="/"/>
    </xforms:instance>

Also, you can add the attribute 'debug="somename"' to any pipeline
component's <input> or <output> elements to print the content to the
log.

Hope that helps.

Henrik

On 9/2/06, Richard Braman <[hidden email]> wrote:

> I am a little confused about the return values from the model.xpl in the
> Google SOAP sample I posted.
>
> In the view.xsl, there is a stmt that prints out the response from the
> SOAP call like this:
>
> <xsl:if test="doc('input:instance')/query != ''">
>
> <pre><xsl:value-of select="/return"/></pre>
>
> </xsl:if>
>
>
> Without being able to see I return, i cant figure out the XPath needed
> to get to the elements of the response that I am interestd in for
> formatting, namely
> the snippet, URL, etc from the google response.
>
> What would you use as an XPath?
>
> Also does anyone think a WSDL to XPL generator would be a good idea for OPS?
>
> Rich
>
>
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

winmail.dat (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OPS SOAP RETURN VALUES

Richard Braman-2
In reply to this post by Henrik Pettersen
Henrik , Stephen
Thanks for the input.
here is the code in view.xsl to print the results in google like format,
but there are a couple of problems I am not sure how to handle in xslt.
First the <title>, <snippet> , and <URL> xml elements complete with type
information are actually printing out in the html instead of being
filtered out.  this is causing the problem of the title not being
displayed as title is a html tag. Secondly, the google results have some
bold and break tags that are being encoded incorrectly and not rendering
right.

<xsl:for-each select="/return/resultElements/item">
                    <p>
                        <xsl:copy-of select="title"/>
                        <br/>
                        <xsl:copy-of select="snippet"/>
                        <br/>
                        <xsl:variable name="URL"
select="URL"></xsl:variable>
                            <b>
                                <a href="{$URL}"><xsl:copy-of
select="URL"></xsl:copy-of></a>
                            </b>
                            <br/>                      
                    </p>
                </xsl:for-each>

here is html this returns:
  <p>
   <title xsi_1:type="xsd:string">&lt;b&gt;SEO&lt;/b&gt;
Home</title><br><snippet xsi_1:type="xsd:string">Mentor an
&lt;b&gt;SEO&lt;/b&gt; Scholar! 07 Aug 06. Click here to learn more.
&lt;b&gt;...&lt;/b&gt; 55 Exchange Place&lt;br&gt;  New York, NY 10005 (212)
    979-2040 info@&lt;b&gt;seo&lt;/b&gt;-usa.org &lt;b&gt;...&lt;/b&gt;
   </snippet><br><b><a href="http://www.seo-ny.org/">
     <URL
xsi_1:type="xsd:string">http://www.seo-ny.org/</URL></a></b><br></p>
  <p>


> Richard,
>
> if you output your data in your xpl as instance data:
>    <p:param name="instance" type="output" />
>
> you need to reference this data in the view like this:
>    <xforms:instance id="user-instance">
>        <xsl:copy-of select="document('input:instance')"/>
>    </xforms:instance>
>
> if you output your data in your xpl as data:
>    <p:param name="data" type="output" />
>
> you need to reference this data in the view like this:
>    <xforms:instance id="user-instance">
>        <xsl:copy-of select="/"/>
>    </xforms:instance>
>
> Also, you can add the attribute 'debug="somename"' to any pipeline
> component's <input> or <output> elements to print the content to the
> log.
>
> Hope that helps.
>
> Henrik
>
> On 9/2/06, Richard Braman <[hidden email]> wrote:
>> I am a little confused about the return values from the model.xpl in the
>> Google SOAP sample I posted.
>>
>> In the view.xsl, there is a stmt that prints out the response from the
>> SOAP call like this:
>>
>> <xsl:if test="doc('input:instance')/query != ''">
>>
>> <pre><xsl:value-of select="/return"/></pre>
>>
>> </xsl:if>
>>
>>
>> Without being able to see I return, i cant figure out the XPath needed
>> to get to the elements of the response that I am interestd in for
>> formatting, namely
>> the snippet, URL, etc from the google response.
>>
>> What would you use as an XPath?
>>
>> Also does anyone think a WSDL to XPL generator would be a good idea
>> for OPS?
>>
>> Rich
>>
>>
>>
>>
>>
>>
>> --
>> 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
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>>
>
> ------------------------------------------------------------------------
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: OPS SOAP RETURN VALUES

Henrik Pettersen
Richard,

have a look at these:

fn:escape-uri(stringURI,esc-res):
http://www.w3schools.com/xpath/xpath_functions.asp

http://mail-archive.objectweb.org/ops-users/2006-08/msg00629.html

Hope that helps.

Henrik

On 9/4/06, Richard Braman <[hidden email]> wrote:

> Henrik , Stephen
> Thanks for the input.
> here is the code in view.xsl to print the results in google like format,
> but there are a couple of problems I am not sure how to handle in xslt.
> First the <title>, <snippet> , and <URL> xml elements complete with type
> information are actually printing out in the html instead of being
> filtered out.  this is causing the problem of the title not being
> displayed as title is a html tag. Secondly, the google results have some
> bold and break tags that are being encoded incorrectly and not rendering
> right.
>
> <xsl:for-each select="/return/resultElements/item">
>                     <p>
>                         <xsl:copy-of select="title"/>
>                         <br/>
>                         <xsl:copy-of select="snippet"/>
>                         <br/>
>                         <xsl:variable name="URL"
> select="URL"></xsl:variable>
>                             <b>
>                                 <a href="{$URL}"><xsl:copy-of
> select="URL"></xsl:copy-of></a>
>                             </b>
>                             <br/>
>                     </p>
>                 </xsl:for-each>
>
> here is html this returns:
>   <p>
>    <title xsi_1:type="xsd:string">&lt;b&gt;SEO&lt;/b&gt;
> Home</title><br><snippet xsi_1:type="xsd:string">Mentor an
> &lt;b&gt;SEO&lt;/b&gt; Scholar! 07 Aug 06. Click here to learn more.
> &lt;b&gt;...&lt;/b&gt; 55 Exchange Place&lt;br&gt;  New York, NY 10005 (212)
>     979-2040 info@&lt;b&gt;seo&lt;/b&gt;-usa.org &lt;b&gt;...&lt;/b&gt;
>    </snippet><br><b><a href="http://www.seo-ny.org/">
>      <URL
> xsi_1:type="xsd:string">http://www.seo-ny.org/</URL></a></b><br></p>
>   <p>
>
>
> > Richard,
> >
> > if you output your data in your xpl as instance data:
> >    <p:param name="instance" type="output" />
> >
> > you need to reference this data in the view like this:
> >    <xforms:instance id="user-instance">
> >        <xsl:copy-of select="document('input:instance')"/>
> >    </xforms:instance>
> >
> > if you output your data in your xpl as data:
> >    <p:param name="data" type="output" />
> >
> > you need to reference this data in the view like this:
> >    <xforms:instance id="user-instance">
> >        <xsl:copy-of select="/"/>
> >    </xforms:instance>
> >
> > Also, you can add the attribute 'debug="somename"' to any pipeline
> > component's <input> or <output> elements to print the content to the
> > log.
> >
> > Hope that helps.
> >
> > Henrik
> >
> > On 9/2/06, Richard Braman <[hidden email]> wrote:
> >> I am a little confused about the return values from the model.xpl in the
> >> Google SOAP sample I posted.
> >>
> >> In the view.xsl, there is a stmt that prints out the response from the
> >> SOAP call like this:
> >>
> >> <xsl:if test="doc('input:instance')/query != ''">
> >>
> >> <pre><xsl:value-of select="/return"/></pre>
> >>
> >> </xsl:if>
> >>
> >>
> >> Without being able to see I return, i cant figure out the XPath needed
> >> to get to the elements of the response that I am interestd in for
> >> formatting, namely
> >> the snippet, URL, etc from the google response.
> >>
> >> What would you use as an XPath?
> >>
> >> Also does anyone think a WSDL to XPL generator would be a good idea
> >> for OPS?
> >>
> >> Rich
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> 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
> >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >>
> >>
> >>
> >
> > ------------------------------------------------------------------------
> >
> >
> > --
> > 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
> > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >
>
>
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: OPS SOAP RETURN VALUES

Richard Braman-2
Hi Henrick,
I am not sure how the escare-uri would help, these are html encodings.
I looked at
saxon:serialize, but I am not sure what to put in the parameters.  I tried

<xsl:copy-of select="saxon:serialize(snippet,'')"/>

but that printed out all sorts of additional xml. like this:

<?xml version="1.0" encoding="UTF-8"?><snippet
xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:v="http://orbeon.org/oxf/xml/validation"
xmlns:xsi_1="http://www.w3.org/1999/XMLSchema-instance"
xsi_1:type="xsd:string">There are six types of &lt;b&gt;Alaska&lt;/b&gt;
Cruise Vacations. Learn which &lt;b&gt;Alaska&lt;/b&gt; Cruise
Vacation&lt;br&gt; is best for you on AlaskaCruises.com.</snippet>

the docs on saxon:serialize didn;t manifest the answer, i saw a
reference to 'xml' on the second parameter from Micheal Kay, but no details.

Richard

Henrik Pettersen wrote:

> Richard,
>
> have a look at these:
>
> fn:escape-uri(stringURI,esc-res):
> http://www.w3schools.com/xpath/xpath_functions.asp
>
> http://mail-archive.objectweb.org/ops-users/2006-08/msg00629.html
>
> Hope that helps.
>
> Henrik
>
> On 9/4/06, Richard Braman <[hidden email]> wrote:
>> Henrik , Stephen
>> Thanks for the input.
>> here is the code in view.xsl to print the results in google like format,
>> but there are a couple of problems I am not sure how to handle in xslt.
>> First the <title>, <snippet> , and <URL> xml elements complete with type
>> information are actually printing out in the html instead of being
>> filtered out.  this is causing the problem of the title not being
>> displayed as title is a html tag. Secondly, the google results have some
>> bold and break tags that are being encoded incorrectly and not rendering
>> right.
>>
>> <xsl:for-each select="/return/resultElements/item">
>>                     <p>
>>                         <xsl:copy-of select="title"/>
>>                         <br/>
>>                         <xsl:copy-of select="snippet"/>
>>                         <br/>
>>                         <xsl:variable name="URL"
>> select="URL"></xsl:variable>
>>                             <b>
>>                                 <a href="{$URL}"><xsl:copy-of
>> select="URL"></xsl:copy-of></a>
>>                             </b>
>>                             <br/>
>>                     </p>
>>                 </xsl:for-each>
>>
>> here is html this returns:
>>   <p>
>>    <title xsi_1:type="xsd:string">&lt;b&gt;SEO&lt;/b&gt;
>> Home</title><br><snippet xsi_1:type="xsd:string">Mentor an
>> &lt;b&gt;SEO&lt;/b&gt; Scholar! 07 Aug 06. Click here to learn more.
>> &lt;b&gt;...&lt;/b&gt; 55 Exchange Place&lt;br&gt;  New York, NY
>> 10005 (212)
>>     979-2040 info@&lt;b&gt;seo&lt;/b&gt;-usa.org &lt;b&gt;...&lt;/b&gt;
>>    </snippet><br><b><a href="http://www.seo-ny.org/">
>>      <URL
>> xsi_1:type="xsd:string">http://www.seo-ny.org/</URL></a></b><br></p>
>>   <p>
>>
>>
>> > Richard,
>> >
>> > if you output your data in your xpl as instance data:
>> >    <p:param name="instance" type="output" />
>> >
>> > you need to reference this data in the view like this:
>> >    <xforms:instance id="user-instance">
>> >        <xsl:copy-of select="document('input:instance')"/>
>> >    </xforms:instance>
>> >
>> > if you output your data in your xpl as data:
>> >    <p:param name="data" type="output" />
>> >
>> > you need to reference this data in the view like this:
>> >    <xforms:instance id="user-instance">
>> >        <xsl:copy-of select="/"/>
>> >    </xforms:instance>
>> >
>> > Also, you can add the attribute 'debug="somename"' to any pipeline
>> > component's <input> or <output> elements to print the content to the
>> > log.
>> >
>> > Hope that helps.
>> >
>> > Henrik
>> >
>> > On 9/2/06, Richard Braman <[hidden email]> wrote:
>> >> I am a little confused about the return values from the model.xpl
>> in the
>> >> Google SOAP sample I posted.
>> >>
>> >> In the view.xsl, there is a stmt that prints out the response from
>> the
>> >> SOAP call like this:
>> >>
>> >> <xsl:if test="doc('input:instance')/query != ''">
>> >>
>> >> <pre><xsl:value-of select="/return"/></pre>
>> >>
>> >> </xsl:if>
>> >>
>> >>
>> >> Without being able to see I return, i cant figure out the XPath
>> needed
>> >> to get to the elements of the response that I am interestd in for
>> >> formatting, namely
>> >> the snippet, URL, etc from the google response.
>> >>
>> >> What would you use as an XPath?
>> >>
>> >> Also does anyone think a WSDL to XPL generator would be a good idea
>> >> for OPS?
>> >>
>> >> Rich
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> 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
>> >> ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>> >>
>> >>
>> >>
>> >
>> >
>> ------------------------------------------------------------------------
>> >
>> >
>> > --
>> > 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
>> > ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>> >
>>
>>
>>
>>
>>
>>
>> --
>> 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
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>>
>
> ------------------------------------------------------------------------
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  




--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: OPS SOAP RETURN VALUES

Stephen Bayliss
In reply to this post by Richard Braman-2
Hi Richard

I'm not sure exactly what you're trying to achieve here -- from the
email thread so far I'm assuming that you've been able to view the raw
SOAP response, and have successfully managed to figure out the XPATH for
the elements you wish to display (in a formatted page)?

If this is correct then from your XSL, I gather that the problem is that
you are getting tags (element names) from the SOAP message in the data,
rather than just showing the contents of the elements?

Your XSL reads:
<xsl:for-each select="/return/resultElements/item">
   <p>
      <xsl:copy-of select="title"/>
      <br/>
      <xsl:copy-of select="snippet"/>
      <br/>
      <xsl:variable name="URL" select="URL"></xsl:variable>
      <b>
         <a href="{$URL}"><xsl:copy-of select="URL"></xsl:copy-of></a>
      </b>
      <br/>                      
   </p>
</xsl:for-each>

If it's simply a case of placing the text of the element (using xpath
notation) /return/ResultElement/item/title within some html <p></p>
tags, then the solution is simple:

Use <xsl:value-of select="title"> instead of xsl:copy-of.

xsl:copy of will take a copy of the whole element, ie the xml tag and
any text contents will be output.  xsl:value-of will take the text
contents of the element.

Or maybe I'm missing something in what you're trying to achieve?

I see you also said that the google results encode some bold and break
tags that are not being rendered correctly -- maybe you could post an
example message that you're getting back, and we can come up with some
XSL to handle this?  (this may well involve using some kind of
escaping/serializing solution as per Henrik's suggestion).

Regards
Steve




-----Original Message-----
From: Richard Braman [mailto:[hidden email]]
Sent: 05 September 2006 05:56
To: [hidden email]
Subject: Re: [ops-users] OPS SOAP RETURN VALUES

Hi Henrick,
I am not sure how the escare-uri would help, these are html encodings.
I looked at
saxon:serialize, but I am not sure what to put in the parameters.  I
tried

<xsl:copy-of select="saxon:serialize(snippet,'')"/>

but that printed out all sorts of additional xml. like this:

<?xml version="1.0" encoding="UTF-8"?><snippet
xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:v="http://orbeon.org/oxf/xml/validation"
xmlns:xsi_1="http://www.w3.org/1999/XMLSchema-instance"
xsi_1:type="xsd:string">There are six types of &lt;b&gt;Alaska&lt;/b&gt;
Cruise Vacations. Learn which &lt;b&gt;Alaska&lt;/b&gt; Cruise
Vacation&lt;br&gt; is best for you on AlaskaCruises.com.</snippet>

the docs on saxon:serialize didn;t manifest the answer, i saw a
reference to 'xml' on the second parameter from Micheal Kay, but no
details.

Richard

Henrik Pettersen wrote:

> Richard,
>
> have a look at these:
>
> fn:escape-uri(stringURI,esc-res):
> http://www.w3schools.com/xpath/xpath_functions.asp
>
> http://mail-archive.objectweb.org/ops-users/2006-08/msg00629.html
>
> Hope that helps.
>
> Henrik
>
> On 9/4/06, Richard Braman <[hidden email]> wrote:
>> Henrik , Stephen
>> Thanks for the input.
>> here is the code in view.xsl to print the results in google like
format,
>> but there are a couple of problems I am not sure how to handle in
xslt.
>> First the <title>, <snippet> , and <URL> xml elements complete with
type
>> information are actually printing out in the html instead of being
>> filtered out.  this is causing the problem of the title not being
>> displayed as title is a html tag. Secondly, the google results have
some
>> bold and break tags that are being encoded incorrectly and not
rendering

>> right.
>>
>> <xsl:for-each select="/return/resultElements/item">
>>                     <p>
>>                         <xsl:copy-of select="title"/>
>>                         <br/>
>>                         <xsl:copy-of select="snippet"/>
>>                         <br/>
>>                         <xsl:variable name="URL"
>> select="URL"></xsl:variable>
>>                             <b>
>>                                 <a href="{$URL}"><xsl:copy-of
>> select="URL"></xsl:copy-of></a>
>>                             </b>
>>                             <br/>
>>                     </p>
>>                 </xsl:for-each>
>>
>> here is html this returns:
>>   <p>
>>    <title xsi_1:type="xsd:string">&lt;b&gt;SEO&lt;/b&gt;
>> Home</title><br><snippet xsi_1:type="xsd:string">Mentor an
>> &lt;b&gt;SEO&lt;/b&gt; Scholar! 07 Aug 06. Click here to learn more.
>> &lt;b&gt;...&lt;/b&gt; 55 Exchange Place&lt;br&gt;  New York, NY
>> 10005 (212)
>>     979-2040 info@&lt;b&gt;seo&lt;/b&gt;-usa.org
&lt;b&gt;...&lt;/b&gt;

>>    </snippet><br><b><a href="http://www.seo-ny.org/">
>>      <URL
>> xsi_1:type="xsd:string">http://www.seo-ny.org/</URL></a></b><br></p>
>>   <p>
>>
>>
>> > Richard,
>> >
>> > if you output your data in your xpl as instance data:
>> >    <p:param name="instance" type="output" />
>> >
>> > you need to reference this data in the view like this:
>> >    <xforms:instance id="user-instance">
>> >        <xsl:copy-of select="document('input:instance')"/>
>> >    </xforms:instance>
>> >
>> > if you output your data in your xpl as data:
>> >    <p:param name="data" type="output" />
>> >
>> > you need to reference this data in the view like this:
>> >    <xforms:instance id="user-instance">
>> >        <xsl:copy-of select="/"/>
>> >    </xforms:instance>
>> >
>> > Also, you can add the attribute 'debug="somename"' to any pipeline
>> > component's <input> or <output> elements to print the content to
the

>> > log.
>> >
>> > Hope that helps.
>> >
>> > Henrik
>> >
>> > On 9/2/06, Richard Braman <[hidden email]> wrote:
>> >> I am a little confused about the return values from the model.xpl
>> in the
>> >> Google SOAP sample I posted.
>> >>
>> >> In the view.xsl, there is a stmt that prints out the response from
>> the
>> >> SOAP call like this:
>> >>
>> >> <xsl:if test="doc('input:instance')/query != ''">
>> >>
>> >> <pre><xsl:value-of select="/return"/></pre>
>> >>
>> >> </xsl:if>
>> >>
>> >>
>> >> Without being able to see I return, i cant figure out the XPath
>> needed
>> >> to get to the elements of the response that I am interestd in for
>> >> formatting, namely
>> >> the snippet, URL, etc from the google response.
>> >>
>> >> What would you use as an XPath?
>> >>
>> >> Also does anyone think a WSDL to XPL generator would be a good
idea

>> >> for OPS?
>> >>
>> >> Rich
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> 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
>> >> ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>> >>
>> >>
>> >>
>> >
>> >
>>
------------------------------------------------------------------------

>> >
>> >
>> > --
>> > 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
>> > ObjectWeb mailing lists service home page:
>> http://www.objectweb.org/wws
>> >
>>
>>
>>
>>
>>
>>
>> --
>> 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
>> ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
>>
>>
>>
>
>
------------------------------------------------------------------------
>
>
> --
> 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
> ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
>  








--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: OPS SOAP RETURN VALUES

Richard Braman-2
thanks steve.

changing copy-of to value-of worked on the first problem , now the remaining problem is the < and > being encoded as &lt; and &gt; I am sure any encoded char would come up like that instead of being translated to the html. the html tags( like the <br> tag and the <b> tag around the URL) that are intact came from my xslt, the bold tags are encoded incorrectly were included in google's response.  I dont know why google includes html body tags in their response, whicc isn't vert standard, but i guess that they want to highlight hits in the fields for the end user.

here is the output
<p>&lt;b&gt;Alaska&lt;/b&gt; Deals<br>Find &lt;b&gt;Alaska&lt;/b&gt; Deals information on AlaskaCruises.com.<br><b><a href="http://www.alaskacruises.com/alaska_deals.asp">http://www.alaskacruises.com/alaska_deals.asp</a></b><br></p>
here is the relevant portion from the view:
<xsl:for-each select="/return/resultElements/item">
                    <p>
                        <xsl:value-of select="title"/>
                        <br/>
                        <xsl:value-of select="snippet"/>
                        <br/>
                        <xsl:variable name="URL" select="URL"></xsl:variable>
                            <b>
                                <a href="{$URL}"><xsl:value-of select="URL"></xsl:value-of></a>
                            </b>
                            <br/>                       
                    </p>
                </xsl:for-each>

Stephen Bayliss wrote:
Hi Richard

I'm not sure exactly what you're trying to achieve here -- from the
email thread so far I'm assuming that you've been able to view the raw
SOAP response, and have successfully managed to figure out the XPATH for
the elements you wish to display (in a formatted page)?

If this is correct then from your XSL, I gather that the problem is that
you are getting tags (element names) from the SOAP message in the data,
rather than just showing the contents of the elements?

Your XSL reads:
<xsl:for-each select="/return/resultElements/item">
   <p>
      <xsl:copy-of select="title"/>
      <br/>
      <xsl:copy-of select="snippet"/>
      <br/>
      <xsl:variable name="URL" select="URL"></xsl:variable>
      <b>
         <a href="{$URL}"><xsl:copy-of select="URL"></xsl:copy-of></a>
      </b>
      <br/>                       
   </p>
</xsl:for-each>

If it's simply a case of placing the text of the element (using xpath
notation) /return/ResultElement/item/title within some html <p></p>
tags, then the solution is simple:

Use <xsl:value-of select="title"> instead of xsl:copy-of.

xsl:copy of will take a copy of the whole element, ie the xml tag and
any text contents will be output.  xsl:value-of will take the text
contents of the element.

Or maybe I'm missing something in what you're trying to achieve?

I see you also said that the google results encode some bold and break
tags that are not being rendered correctly -- maybe you could post an
example message that you're getting back, and we can come up with some
XSL to handle this?  (this may well involve using some kind of
escaping/serializing solution as per Henrik's suggestion).

Regards
Steve




-----Original Message-----
From: Richard Braman [[hidden email]] 
Sent: 05 September 2006 05:56
To: [hidden email]
Subject: Re: [ops-users] OPS SOAP RETURN VALUES

Hi Henrick,
I am not sure how the escare-uri would help, these are html encodings. 
I looked at
saxon:serialize, but I am not sure what to put in the parameters.  I
tried

<xsl:copy-of select="saxon:serialize(snippet,'')"/>

but that printed out all sorts of additional xml. like this:

<?xml version="1.0" encoding="UTF-8"?><snippet
xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:v="http://orbeon.org/oxf/xml/validation"
xmlns:xsi_1="http://www.w3.org/1999/XMLSchema-instance"
xsi_1:type="xsd:string">There are six types of &lt;b&gt;Alaska&lt;/b&gt;
Cruise Vacations. Learn which &lt;b&gt;Alaska&lt;/b&gt; Cruise
Vacation&lt;br&gt; is best for you on AlaskaCruises.com.</snippet>

the docs on saxon:serialize didn;t manifest the answer, i saw a
reference to 'xml' on the second parameter from Micheal Kay, but no
details.

Richard

Henrik Pettersen wrote:
  
Richard,

have a look at these:

fn:escape-uri(stringURI,esc-res):
http://www.w3schools.com/xpath/xpath_functions.asp

http://mail-archive.objectweb.org/ops-users/2006-08/msg00629.html

Hope that helps.

Henrik

On 9/4/06, Richard Braman [hidden email] wrote:
    
Henrik , Stephen
Thanks for the input.
here is the code in view.xsl to print the results in google like
      
format,
  
but there are a couple of problems I am not sure how to handle in
      
xslt.
  
First the <title>, <snippet> , and <URL> xml elements complete with
      
type
  
information are actually printing out in the html instead of being
filtered out.  this is causing the problem of the title not being
displayed as title is a html tag. Secondly, the google results have
      
some
  
bold and break tags that are being encoded incorrectly and not
      
rendering
  
right.

<xsl:for-each select="/return/resultElements/item">
                    <p>
                        <xsl:copy-of select="title"/>
                        <br/>
                        <xsl:copy-of select="snippet"/>
                        <br/>
                        <xsl:variable name="URL"
select="URL"></xsl:variable>
                            <b>
                                <a href="{$URL}"><xsl:copy-of
select="URL"></xsl:copy-of></a>
                            </b>
                            <br/>
                    </p>
                </xsl:for-each>

here is html this returns:
  <p>
   <title xsi_1:type="xsd:string">&lt;b&gt;SEO&lt;/b&gt;
Home</title><br><snippet xsi_1:type="xsd:string">Mentor an
&lt;b&gt;SEO&lt;/b&gt; Scholar! 07 Aug 06. Click here to learn more.
&lt;b&gt;...&lt;/b&gt; 55 Exchange Place&lt;br&gt;  New York, NY
10005 (212)
    979-2040 [hidden email]
      
&lt;b&gt;...&lt;/b&gt;
  
   </snippet><br><b><a href="http://www.seo-ny.org/">
     <URL
xsi_1:type="xsd:string">http://www.seo-ny.org/</URL></a></b><br></p>
  <p>


      
Richard,

if you output your data in your xpl as instance data:
   <p:param name="instance" type="output" />

you need to reference this data in the view like this:
   <xforms:instance id="user-instance">
       <xsl:copy-of select="document('input:instance')"/>
   </xforms:instance>

if you output your data in your xpl as data:
   <p:param name="data" type="output" />

you need to reference this data in the view like this:
   <xforms:instance id="user-instance">
       <xsl:copy-of select="/"/>
   </xforms:instance>

Also, you can add the attribute 'debug="somename"' to any pipeline
component's <input> or <output> elements to print the content to
        
the
  
log.

Hope that helps.

Henrik

On 9/2/06, Richard Braman [hidden email] wrote:
        
I am a little confused about the return values from the model.xpl
          
in the
      
Google SOAP sample I posted.

In the view.xsl, there is a stmt that prints out the response from
          
the
      
SOAP call like this:

<xsl:if test="doc('input:instance')/query != ''">

<pre><xsl:value-of select="/return"/></pre>

</xsl:if>


Without being able to see I return, i cant figure out the XPath
          
needed
      
to get to the elements of the response that I am interestd in for
formatting, namely
the snippet, URL, etc from the google response.

What would you use as an XPath?

Also does anyone think a WSDL to XPL generator would be a good
          
idea
  
for OPS?

Rich






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

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




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

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






  

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



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: OPS SOAP RETURN VALUES

Stephen Bayliss
In reply to this post by Richard Braman-2

Yes I just had a quick look here and I can see the same thing in the raw SOAP message returned from Google.  Ugly!

 

If you can live with loosing the bold tags entirely, you could use the replace function.  For instance

<p>

<xsl:variable name="text" select="title"></xsl:variable>

<xsl:variable name=”textUntagged” select=”replace($text,’&lt;b&gt;’,’’)”/>

<xsl:value-of select=”$textUntagged”/>

….etc….

</p>

 

That should get rid of the opening tag.  Nest the function to get rid of both, eg

<xsl:variable name=”textUntagged” select=”replace(replace($text,’&lt;b&gt;’,’’),’&lt;/b&gt;’,’’)”/>

 

Actually in my raw SOAP output, I see the tags as &lt;b>   (ie only the opening < is escaped) so you might want to try the following as an alternative

<xsl:variable name=”textUntagged” select=”replace(replace($text,’&lt;b>’,’’),’&lt;/b>’,’’)”/>

 

Not a particularly elegant solution, maybe someone has a better idea?

 

I would have thought this would be quite a common problem, so you might find more by searching around.

 

Steve

 


From: Richard Braman [mailto:[hidden email]]
Sent: 05 September 2006 21:46
To: [hidden email]
Subject: Re: [ops-users] OPS SOAP RETURN VALUES

 

thanks steve.

changing copy-of to value-of worked on the first problem , now the remaining problem is the < and > being encoded as &lt; and &gt; I am sure any encoded char would come up like that instead of being translated to the html. the html tags( like the <br> tag and the <b> tag around the URL) that are intact came from my xslt, the bold tags are encoded incorrectly were included in google's response.  I dont know why google includes html body tags in their response, whicc isn't vert standard, but i guess that they want to highlight hits in the fields for the end user.

here is the output

<p>&lt;b&gt;Alaska&lt;/b&gt; Deals<br>Find &lt;b&gt;Alaska&lt;/b&gt; Deals information on AlaskaCruises.com.<br><b><a href="http://www.alaskacruises.com/alaska_deals.asp">http://www.alaskacruises.com/alaska_deals.asp</a></b><br></p>
here is the relevant portion from the view:

<xsl:for-each select="/return/resultElements/item">
                    <p>
                        <xsl:value-of select="title"/>
                        <br/>
                        <xsl:value-of select="snippet"/>
                        <br/>
                       
n
                            <b>
                                <a href="{$URL}"><xsl:value-of select="URL"></xsl:value-of></a>
                            </b>
                            <br/>                       
                    </p>
                </xsl:for-each>

Stephen Bayliss wrote:

Hi Richard
 
I'm not sure exactly what you're trying to achieve here -- from the
email thread so far I'm assuming that you've been able to view the raw
SOAP response, and have successfully managed to figure out the XPATH for
the elements you wish to display (in a formatted page)?
 
If this is correct then from your XSL, I gather that the problem is that
you are getting tags (element names) from the SOAP message in the data,
rather than just showing the contents of the elements?
 
Your XSL reads:
<xsl:for-each select="/return/resultElements/item">
   <p>
      <xsl:copy-of select="title"/>
      <br/>
      <xsl:copy-of select="snippet"/>
      <br/>
      <xsl:variable name="URL" select="URL"></xsl:variable>
      <b>
         <a href="{$URL}"><xsl:copy-of select="URL"></xsl:copy-of></a>
      </b>
      <br/>                       
   </p>
</xsl:for-each>
 
If it's simply a case of placing the text of the element (using xpath
notation) /return/ResultElement/item/title within some html <p></p>
tags, then the solution is simple:
 
Use <xsl:value-of select="title"> instead of xsl:copy-of.
 
xsl:copy of will take a copy of the whole element, ie the xml tag and
any text contents will be output.  xsl:value-of will take the text
contents of the element.
 
Or maybe I'm missing something in what you're trying to achieve?
 
I see you also said that the google results encode some bold and break
tags that are not being rendered correctly -- maybe you could post an
example message that you're getting back, and we can come up with some
XSL to handle this?  (this may well involve using some kind of
escaping/serializing solution as per Henrik's suggestion).
 
Regards
Steve
 
 
 
 
-----Original Message-----
From: Richard Braman [[hidden email]] 
Sent: 05 September 2006 05:56
To: [hidden email]
Subject: Re: [ops-users] OPS SOAP RETURN VALUES
 
Hi Henrick,
I am not sure how the escare-uri would help, these are html encodings. 
I looked at
saxon:serialize, but I am not sure what to put in the parameters.  I
tried
 
<xsl:copy-of select="saxon:serialize(snippet,'')"/>
 
but that printed out all sorts of additional xml. like this:
 
<?xml version="1.0" encoding="UTF-8"?><snippet
xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:delegation="http://orbeon.org/oxf/xml/delegation"
xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:v="http://orbeon.org/oxf/xml/validation"
xmlns:xsi_1="http://www.w3.org/1999/XMLSchema-instance"
xsi_1:type="xsd:string">There are six types of &lt;b&gt;Alaska&lt;/b&gt;
Cruise Vacations. Learn which &lt;b&gt;Alaska&lt;/b&gt; Cruise
Vacation&lt;br&gt; is best for you on AlaskaCruises.com.</snippet>
 
the docs on saxon:serialize didn;t manifest the answer, i saw a
reference to 'xml' on the second parameter from Micheal Kay, but no
details.
 
Richard
 
Henrik Pettersen wrote:
  
Richard,
 
have a look at these:
 
fn:escape-uri(stringURI,esc-res):
http://www.w3schools.com/xpath/xpath_functions.asp
 
http://mail-archive.objectweb.org/ops-users/2006-08/msg00629.html
 
Hope that helps.
 
Henrik
 
On 9/4/06, Richard Braman [hidden email] wrote:
    
Henrik , Stephen
Thanks for the input.
here is the code in view.xsl to print the results in google like
      
format,
  
but there are a couple of problems I am not sure how to handle in
      
xslt.
  
First the <title>, <snippet> , and <URL> xml elements complete with
      
type
  
information are actually printing out in the html instead of being
filtered out.  this is causing the problem of the title not being
displayed as title is a html tag. Secondly, the google results have
      
some
  
bold and break tags that are being encoded incorrectly and not
      
rendering
  
right.
 
<xsl:for-each select="/return/resultElements/item">
                    <p>
                        <xsl:copy-of select="title"/>
                        <br/>
                        <xsl:copy-of select="snippet"/>
                        <br/>
                        <xsl:variable name="URL"
select="URL"></xsl:variable>
                            <b>
                                <a href="{$URL}"><xsl:copy-of
select="URL"></xsl:copy-of></a>
                            </b>
                            <br/>
                    </p>
                </xsl:for-each>
 
here is html this returns:
  <p>
   <title xsi_1:type="xsd:string">&lt;b&gt;SEO&lt;/b&gt;
Home</title><br><snippet xsi_1:type="xsd:string">Mentor an
&lt;b&gt;SEO&lt;/b&gt; Scholar! 07 Aug 06. Click here to learn more.
&lt;b&gt;...&lt;/b&gt; 55 Exchange Place&lt;br&gt;  New York, NY
10005 (212)
    979-2040 [hidden email]
      
&lt;b&gt;...&lt;/b&gt;
  
   </snippet><br><b><a href="http://www.seo-ny.org/">
     <URL
xsi_1:type="xsd:string">http://www.seo-ny.org/</URL></a></b><br></p>
  <p>
 
 
      
Richard,
 
if you output your data in your xpl as instance data:
   <p:param name="instance" type="output" />
 
you need to reference this data in the view like this:
   <xforms:instance id="user-instance">
       <xsl:copy-of select="document('input:instance')"/>
   </xforms:instance>
 
if you output your data in your xpl as data:
   <p:param name="data" type="output" />
 
you need to reference this data in the view like this:
   <xforms:instance id="user-instance">
       <xsl:copy-of select="/"/>
   </xforms:instance>
 
Also, you can add the attribute 'debug="somename"' to any pipeline
component's <input> or <output> elements to print the content to
        
the
  
log.
 

				
Reply | Threaded
Open this post in threaded view
|

Re: difference between @value and @ref on xforms:output

Erik Bruchez
Administrator
In reply to this post by Ryan Puddephatt
Ryan,

This does not seem to happen all the time, as the attached example
works. Could this be because your current context is set to a node-set
that belongs to another instance?

-Erik

Ryan Puddephatt wrote:

> All,
>     I have noticed that from @value you cannot access the default
> instance through /root-node/element you have to use
> instance('main-instance')/element. Is this for a reason or a bug?
>  
> Thanks
>  
> Ryan
>
> Ryan Puddephatt
> Software Engineer
>  
>
> Teleflex Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotland
> EH54 7DP
>  
> e> [hidden email] <mailto:[hidden email]>
> t> +44(0)1506 407 110
> f> +44(0)1506 407 108
> w> www.teleflex.com <http://www.teleflex.com/>
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/


--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

test.xhtml (956 bytes) Download Attachment