You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ian Atkin <Ia...@Widelearning.com> on 2000/10/20 18:05:24 UTC

cache problem (i think)

cocoon-users,

i'm trying to do the following:-
- read an xml file on an NT public share based on a UNC path passed in as an
http parameter
- do some processing on the xml to make it work with cocoon (writing the
required pi's essentially)
- transform the stored xml with a stylesheet specified in another http
parameter

my failed attempt was to write a new producer, which worked the first tiem
it was run, but now returns exactly the same html output every time

after turning of caching and re-starting the problem still remains.

i'm now thinking there must be something about my producer or the original
http request, but i'm not sure.

if anyone can help in getting this approach to work or knows of a better way
any comments would be appreciated...

Ian Atkin
Code Monkey & Text File Editor
Wide Learning
ian.atkin@widelearning.com
020-7253-1211


RE: cache problem (i think)

Posted by Per Kreipke <pe...@onclave.com>.
If you didn't use the UNC path but mapped the drive to a letter, you could
simply use the util taglib to include the file like so:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-format type="text/xml"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="myxsl.xsl" type="text/xsl"?>

<xsp:page language="java"
	xmlns:xsp="http://www.apache.org/1999/XSP/Core"
	xmlns:util="http://www.apache.org/1999/XSP/Util"
>
	<!-- One way: include the file itself -->
	<util:include-file>
		<util:name>x:\path\to\myfile.xml</util:name>
	</util:include-file>

	<!-- Second way: include the file itself -->
	<util:include-file name="x:\path\to\myfile.xml"/>
</xsp:page>

Notes:
- who knows, UNC paths mi
- you could also use the XInclude processor instead if you can get to the
file using HTTP. Though I don't know as much about it, I've gotten this to
work:

<?xml version="1.0"?>
<?cocoon-process type="xinclude"?> <!-- this is the key -->
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="myxsl.xsl" type="text/xsl"?>

<xsp:page language="java"
	xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
<feed xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
	<whatever xinclude:href="http://www.cnn.com/cnn.rss" xinclude:parse="xml"/>
</feed>
</xsp:page>

> -----Original Message-----
> From: Ian Atkin [mailto:Iana@Widelearning.com]
> Sent: Friday, October 20, 2000 12:05 PM
> To: 'cocoon-users@xml.apache.org'
> Subject: cache problem (i think)
>
>
> cocoon-users,
>
> i'm trying to do the following:-
> - read an xml file on an NT public share based on a UNC path
> passed in as an
> http parameter
> - do some processing on the xml to make it work with cocoon (writing the
> required pi's essentially)
> - transform the stored xml with a stylesheet specified in another http
> parameter
>
> my failed attempt was to write a new producer, which worked the first tiem
> it was run, but now returns exactly the same html output every time
>
> after turning of caching and re-starting the problem still remains.
>
> i'm now thinking there must be something about my producer or the original
> http request, but i'm not sure.
>
> if anyone can help in getting this approach to work or knows of a
> better way
> any comments would be appreciated...
>
> Ian Atkin
> Code Monkey & Text File Editor
> Wide Learning
> ian.atkin@widelearning.com
> 020-7253-1211
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>