Accessing local instance in xsl view

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

Accessing local instance in xsl view

Shaw, Richard A
Accessing local instance in xsl view

Can I ask my question again the last answer didn't work and the thread has gone dry.

In the following view.xsl the xsl_value-of prints nothing but the xforms:output works. Do I have the syntax wrong ?

I put 'local' in my title because if the instance is xi:included then the xsl document('input:instance')/root/data1 syntax works fine, however I'm using a submission with a replace instance, so I can't move it to the default submission.

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:ui="urn:ui"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xsl:version="2.0">

<xhtml:head>
<xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
<xforms:instance id="my-data">
<root>
<data1>1</data1>
<data2>2</data2>
</root>
</xforms:instance>
</xforms:model>
</xhtml:head>
<xhtml:body>
Data = <xsl:value-of select="/root/data1"/>
XData = <xforms:output ref="/root/data1"/>
</xhtml:body>
</xhtml:html>


Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority   
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
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: Accessing local instance in xsl view

Ryan Puddephatt
Accessing local instance in xsl view

Richard,

            I looked through my code an the only time I’m able to access it from XSL is when I have used @model in the page-flow. Why is it you want to access it with XSL and not XForms? Is there something your trying to achieve? I notice you want to use it on a replace instance submission. This is not possible because XSL is run once on page load, then only XForms is used after that!

 

Hope this helps

 

Ryan

 

Ryan Puddephatt

Software Engineer

TFX Group - IT UK

1 Michaelson Square

Livingston

West Lothian

Scotand

EH54 7DP

 

* [hidden email]

( 01506 407 110

7  01506 407 108

 


From: Shaw, Richard A [mailto:[hidden email]]
Sent: 28 April 2006 11:50
To: [hidden email]
Subject: [ops-users] Accessing local instance in xsl view

 

Can I ask my question again the last answer didn't work and the thread has gone dry.

In the following view.xsl the xsl_value-of prints nothing but the xforms:output works. Do I have the syntax wrong ?

I put 'local' in my title because if the instance is xi:included then the xsl document('input:instance')/root/data1 syntax works fine, however I'm using a submission with a replace instance, so I can't move it to the default submission.

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:ui="urn:ui"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xsl:version="2.0">

<xhtml:head>
<xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
<xforms:instance id="my-data">
<root>
<data1>1</data1>
<data2>2</data2>
</root>
</xforms:instance>
</xforms:model>
</xhtml:head>
<xhtml:body>
Data = <xsl:value-of select="/root/data1"/>
XData = <xforms:output ref="/root/data1"/>
</xhtml:body>
</xhtml:html>

 

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority   
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its

 

This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
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: Accessing local instance in xsl view

Shaw, Richard A
In reply to this post by Shaw, Richard A
Accessing local instance in xsl view
So are you saying that an xforms submission with a replace will only change the xforms sections on the page - I assumed that the replace would cause the page to be re-generated. I suppose when I think about it, I can see that the replace submission would be just AJAX replacing parts of the page.
 
The reason for what I'm doing is twofold -
 
1- the first is that I need to use xxforms:repeat-current() in order to access my reference data in the data for my page, and I can't get it to work (hence my questions about the nightly build). I can overcome this by using xsl because I can use variables (my other posts in the past show why this is).
 
2- my current solution is to submit the page when the user selects a new row in my summary table for which I want to see the details (from the instance data) and run a pipeline on the view. My instance data has the following items - request paramters, results, selected detail from results. And my pipeline does the following -
 
if no results in the instance then
    make a web service request to get them using request parameters
else
    use the selected summary index to copy details from results to selected detail
 
my page then displays the summary table and the selected detail.
 
This works fine except that after about the 5th detail selection I get a java heap space exception, so I was looking for a different way to do it.
 

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority   
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its

 


From: Ryan Puddephatt [mailto:[hidden email]]
Sent: 28 April 2006 12:15
To: [hidden email]
Subject: RE: [ops-users] Accessing local instance in xsl view

Richard,

            I looked through my code an the only time I’m able to access it from XSL is when I have used @model in the page-flow. Why is it you want to access it with XSL and not XForms? Is there something your trying to achieve? I notice you want to use it on a replace instance submission. This is not possible because XSL is run once on page load, then only XForms is used after that!

Hope this helps

Ryan

Ryan Puddephatt

Software Engineer

TFX Group - IT UK

1 Michaelson Square

Livingston

West Lothian

Scotand

EH54 7DP

* [hidden email]

( 01506 407 110

7  01506 407 108


From: Shaw, Richard A [mailto:[hidden email]]
Sent: 28 April 2006 11:50
To: [hidden email]
Subject: [ops-users] Accessing local instance in xsl view

Can I ask my question again the last answer didn't work and the thread has gone dry.

In the following view.xsl the xsl_value-of prints nothing but the xforms:output works. Do I have the syntax wrong ?

I put 'local' in my title because if the instance is xi:included then the xsl document('input:instance')/root/data1 syntax works fine, however I'm using a submission with a replace instance, so I can't move it to the default submission.

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:ui="urn:ui"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xsl:version="2.0">

<xhtml:head>
<xforms:model xmlns:xforms="http://www.w3.org/2002/xforms">
<xforms:instance id="my-data">
<root>
<data1>1</data1>
<data2>2</data2>
</root>
</xforms:instance>
</xforms:model>
</xhtml:head>
<xhtml:body>
Data = <xsl:value-of select="/root/data1"/>
XData = <xforms:output ref="/root/data1"/>
</xhtml:body>
</xhtml:html>

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority   
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its

This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



This message has been scanned for viruses by MailControl



--
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: Accessing local instance in xsl view

Ryan Puddephatt
Accessing local instance in xsl view

Richard,

 

So are you saying that an xforms submission with a replace will only change the xforms sections on the page - I assumed that the replace would cause the page to be re-generated. I suppose when I think about it, I can see that the replace submission would be just AJAX replacing parts of the page.

 

That’s correct the AJAX just replaces the content in the page, it doesn’t actually rebuild it. If you wanted to use your XSL solution you would have to @replace=”all” on your submission, but obviously you loose the advantage of AJAX

 

The reason for what I'm doing is twofold -

 

1-   the first is that I need to use xxforms:repeat-current() in order to access my reference data in the data for my page, and I can't get it to work (hence my questions about the nightly build). I can overcome this by using xsl because I can use variables (my other posts in the past show why this is).

 

As I replied to the other post, I stand the WEB-INF directory side by side and view them in a div to overcome any problems with what files need copying, amending, deleting etc.

 

2- my current solution is to submit the page when the user selects a new row in my summary table for which I want to see the details (from the instance data) and run a pipeline on the view. My instance data has the following items - request paramters, results, selected detail from results. And my pipeline does the following -

 

I would have thought submitting it would work, can’t see a problem with that, apart from a small loss in performance

 

if no results in the instance then

    make a web service request to get them using request parameters

else

    use the selected summary index to copy details from results to selected detail

 

Sounds reasonable

 

my page then displays the summary table and the selected detail.

 

This works fine except that after about the 5th detail selection I get a java heap space exception, so I was looking for a different way to do it.

 

Have you posted this exception on the list? It doesn’t sound normal, how much information get posted back?

 

Ryan

 

Ryan Puddephatt

Software Engineer

TFX Group - IT UK

1 Michaelson Square

Livingston

West Lothian

Scotand

EH54 7DP

 

* [hidden email]

( 01506 407 110

7  01506 407 108



--
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: Accessing local instance in xsl view

Shaw, Richard A
In reply to this post by Shaw, Richard A
Accessing local instance in xsl view
my data is about 10K - 2K per result so when I select my result my instance is 12K.
 
I have checked to ensure that I am not adding 2K each time and I'm not the debug shows that.
 
I discovered that if I put my results into a file and use it as the default submission (instead of fetching from my web service), I can make it fail by pressing the refresh button in the browser repeatedly when the URL has changed to xforms-server-submit.
 
I will package a few files when I'm backin the office on Tuesday and post to the list.
 

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority   
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its

 


From: Ryan Puddephatt [mailto:[hidden email]]
Sent: 28 April 2006 14:55
To: [hidden email]
Subject: RE: [ops-users] Accessing local instance in xsl view

Richard,

So are you saying that an xforms submission with a replace will only change the xforms sections on the page - I assumed that the replace would cause the page to be re-generated. I suppose when I think about it, I can see that the replace submission would be just AJAX replacing parts of the page.

That’s correct the AJAX just replaces the content in the page, it doesn’t actually rebuild it. If you wanted to use your XSL solution you would have to @replace=”all” on your submission, but obviously you loose the advantage of AJAX

The reason for what I'm doing is twofold -

1-   the first is that I need to use xxforms:repeat-current() in order to access my reference data in the data for my page, and I can't get it to work (hence my questions about the nightly build). I can overcome this by using xsl because I can use variables (my other posts in the past show why this is).

As I replied to the other post, I stand the WEB-INF directory side by side and view them in a div to overcome any problems with what files need copying, amending, deleting etc.

2- my current solution is to submit the page when the user selects a new row in my summary table for which I want to see the details (from the instance data) and run a pipeline on the view. My instance data has the following items - request paramters, results, selected detail from results. And my pipeline does the following -

I would have thought submitting it would work, can’t see a problem with that, apart from a small loss in performance

if no results in the instance then

    make a web service request to get them using request parameters

else

    use the selected summary index to copy details from results to selected detail

Sounds reasonable

my page then displays the summary table and the selected detail.

This works fine except that after about the 5th detail selection I get a java heap space exception, so I was looking for a different way to do it.

Have you posted this exception on the list? It doesn’t sound normal, how much information get posted back?

Ryan

Ryan Puddephatt

Software Engineer

TFX Group - IT UK

1 Michaelson Square

Livingston

West Lothian

Scotand

EH54 7DP

* [hidden email]

( 01506 407 110

7  01506 407 108



This message has been scanned for viruses by MailControl



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
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