Advice on refreshing XSLT view

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

Advice on refreshing XSLT view

Shaw, Richard A
Advice on refreshing XSLT view

I have the following use case and wondered if somebody could critique my approach using OPS -

Current appraoch -

1 - I have a 3 part page (no frames) which contains a form, map, and results area.
2 - The user used the map to fill in the form and pressed submit
3 - The results are obtained from a web service using a replacement submission (The results are in XML format and are transformed into HTML on the server and the HTML snippet is returned)

4 - The results automatically appear because the results area has an xforms:output in it.

I want to add printing as a PDF document to this, so I want the raw XML results in the model so that I can transform into PDF without talking to the web service again. I think I have two options for this -

A - put the raw XML and the transformed XML (HTML snippet) into the model

B - return the raw XML in step 3 and use javascript on the client to do the XSLT transform

Note: I don't think I can use xforms:outputs for the results because I want to display icons for an enumerated value in the raw data.

I don't like A because I'm putting duplicate data into the model, and I don't like B because I'm putting more work on the client side.

What do others think ? Is there a better way of doing this with OPS e.g. with an xxforms function which does transforms like the xxforms:serialize (I can't find one) ?



Richard Shaw

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

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
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.

The ultimate parent company of the Atkins Group is WS Atkins plc.  Registered in England No. 1885586.  Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.

P Consider the environment. Please don't print this e-mail unless you really need to.



--
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: Advice on refreshing XSLT view

Ryan Puddephatt
Richard,
    Why can't you use xforms/xhtml to display the output data?

I think storing both in the model could slow down server performance.

If you can use Xforms for the output then you will only need the XML, if you have to transform it, use the server as its faster, and store the XML in a session variable, which you can pull out if you need it for the PDF generation

Just my 2c

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



Shaw, Richard A wrote:
Advice on refreshing XSLT view

I have the following use case and wondered if somebody could critique my approach using OPS -

Current appraoch -

1 - I have a 3 part page (no frames) which contains a form, map, and results area.
2 - The user used the map to fill in the form and pressed submit
3 - The results are obtained from a web service using a replacement submission (The results are in XML format and are transformed into HTML on the server and the HTML snippet is returned)

4 - The results automatically appear because the results area has an xforms:output in it.

I want to add printing as a PDF document to this, so I want the raw XML results in the model so that I can transform into PDF without talking to the web service again. I think I have two options for this -

A - put the raw XML and the transformed XML (HTML snippet) into the model

B - return the raw XML in step 3 and use javascript on the client to do the XSLT transform

Note: I don't think I can use xforms:outputs for the results because I want to display icons for an enumerated value in the raw data.

I don't like A because I'm putting duplicate data into the model, and I don't like B because I'm putting more work on the client side.

What do others think ? Is there a better way of doing this with OPS e.g. with an xxforms function which does transforms like the xxforms:serialize (I can't find one) ?



Richard Shaw

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

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
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.

The ultimate parent company of the Atkins Group is WS Atkins plc.  Registered in England No. 1885586.  Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.

P Consider the environment. Please don't print this e-mail unless you really need to.


-- 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: Advice on refreshing XSLT view

Alessandro Vernet
Administrator
In reply to this post by Shaw, Richard A
Hi Richard,

Is the transformation from the XML returned by the service to HTML
done with XSLT on the server side right now? If this is the case, I
don't think option A is that bad. And it is certainly better than B,
because you won't need to deal with JavaScript to run XSLT on the
client-side (which is a can of worms) and to transfer the XML instance
to the client. The XML will stay on the server in an instance; there
will be no impact on the client; and it will just take a bit more
processing power on the server, which might not even be significant
unless you are dealing with a large XML document.

Alex

On 3/13/07, Shaw, Richard A <[hidden email]> wrote:

>
>
>
> I have the following use case and wondered if somebody could critique my
> approach using OPS -
>
> Current appraoch -
>
> 1 - I have a 3 part page (no frames) which contains a form, map, and results
> area.
> 2 - The user used the map to fill in the form and pressed submit
> 3 - The results are obtained from a web service using a replacement
> submission (The results are in XML format and are transformed into HTML on
> the server and the HTML snippet is returned)
>
> 4 - The results automatically appear because the results area has an
> xforms:output in it.
>
> I want to add printing as a PDF document to this, so I want the raw XML
> results in the model so that I can transform into PDF without talking to the
> web service again. I think I have two options for this -
>
> A - put the raw XML and the transformed XML (HTML snippet) into the model
>
> B - return the raw XML in step 3 and use javascript on the client to do the
> XSLT transform
>
> Note: I don't think I can use xforms:outputs for the results because I want
> to display icons for an enumerated value in the raw data.
>
> I don't like A because I'm putting duplicate data into the model, and I
> don't like B because I'm putting more work on the client side.
>
> What do others think ? Is there a better way of doing this with OPS e.g.
> with an xxforms function which does transforms like the xxforms:serialize (I
> can't find one) ?
>
>
>
> Richard Shaw
>
> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
> Richard Shaw
> Technical Design Authority - Information Solutions Consultancy
> 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.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc.
> Registered in England No. 1885586.  Registered Office Woodcote Grove, Ashley
> Road, Epsom, Surrey KT18 5BW.
>
> P Consider the environment. Please don't print this e-mail unless you really
> need to.
>
> --
> 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
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.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
|

RE: Advice on refreshing XSLT view

Shaw, Richard A
Thanks for that.

I am using XSLT on the server. What I'm not sure about is the fact that I'm doing the web service request and the XSLT transform as part of a submission with an instance replace. I've done this so that my results appear in the page without having to redraw the page. I'm not sure how I can put my raw XML into an instance without returning it too. Maybe I'm missing something - does the instance get replaced on the server and then the client page is refreshed causing the xforms:output to fetch the bit it needs from the server, in which case all my data isn't being returned to the client.


Richard Shaw

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

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
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

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet
Sent: 13 March 2007 20:14
To: [hidden email]
Subject: Re: [ops-users] Advice on refreshing XSLT view

Hi Richard,

Is the transformation from the XML returned by the service to HTML done with XSLT on the server side right now? If this is the case, I don't think option A is that bad. And it is certainly better than B, because you won't need to deal with JavaScript to run XSLT on the client-side (which is a can of worms) and to transfer the XML instance to the client. The XML will stay on the server in an instance; there will be no impact on the client; and it will just take a bit more processing power on the server, which might not even be significant unless you are dealing with a large XML document.

Alex

On 3/13/07, Shaw, Richard A <[hidden email]> wrote:

>
>
>
> I have the following use case and wondered if somebody could critique
> my approach using OPS -
>
> Current appraoch -
>
> 1 - I have a 3 part page (no frames) which contains a form, map, and
> results area.
> 2 - The user used the map to fill in the form and pressed submit
> 3 - The results are obtained from a web service using a replacement
> submission (The results are in XML format and are transformed into
> HTML on the server and the HTML snippet is returned)
>
> 4 - The results automatically appear because the results area has an
> xforms:output in it.
>
> I want to add printing as a PDF document to this, so I want the raw
> XML results in the model so that I can transform into PDF without
> talking to the web service again. I think I have two options for this
> -
>
> A - put the raw XML and the transformed XML (HTML snippet) into the
> model
>
> B - return the raw XML in step 3 and use javascript on the client to
> do the XSLT transform
>
> Note: I don't think I can use xforms:outputs for the results because I
> want to display icons for an enumerated value in the raw data.
>
> I don't like A because I'm putting duplicate data into the model, and
> I don't like B because I'm putting more work on the client side.
>
> What do others think ? Is there a better way of doing this with OPS e.g.
> with an xxforms function which does transforms like the
> xxforms:serialize (I can't find one) ?
>
>
>
> Richard Shaw
>
> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
> Richard Shaw
> Technical Design Authority - Information Solutions Consultancy
> 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.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc.
> Registered in England No. 1885586.  Registered Office Woodcote Grove,
> Ashley Road, Epsom, Surrey KT18 5BW.
>
> P Consider the environment. Please don't print this e-mail unless you
> really need to.
>
> --
> 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
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.com/



This message has been scanned for viruses by MailControl - (see http://bluepages.wsatkins.co.uk/?6875772)



--
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: Advice on refreshing XSLT view

Alessandro Vernet
Administrator
On 3/14/07, Shaw, Richard A <[hidden email]> wrote:
> I am using XSLT on the server. What I'm not sure about is the fact that I'm doing the web service request and the XSLT transform as part of a submission with an instance replace. I've done this so that my results appear in the page without having to redraw the page. I'm not sure how I can put my raw XML into an instance without returning it too. Maybe I'm missing something - does the instance get replaced on the server and then the client page is refreshed causing the xforms:output to fetch the bit it needs from the server, in which case all my data isn't being returned to the client.

Hi Richard,

Yes exactly: the instance gets replaced on the server and only what
the browser needs to display the <xforms:output> is sent to the
browser.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.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