You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Silke Schön <si...@web.de> on 2002/08/16 19:35:41 UTC
host selector
Thanks a lot, Vadim!
Now I changed my pipeline as you said, using a host selector this time:
#
#<map:match pattern="**research.pdf">
# <map:generate src="content/research/research.xml"/>
# <map:select type="host">
# <map:when test=localhost">
# <map:transform src="transforms/page-fo.xsl"/>
# </map:when>
# <map:otherwise>
# <map:transform src="transforms/no-access.xsl"/>
# </map:otherwise>
# </map:select>
# <map:serialize type="fo2pdf"/>
#</map:match>
#
I want my pdf only to be accessible from the localhost, from other computers a different pdf should be seen.
But where can I now set that localhost is the "host:port" (port is 80 in my case) in my URI?
I tried with a unlisted element just below the host selector in my component part:
#
#<map:selector name="host" src="org.apache.cocoon.selection.HostSelector">
# <host name="localhost" value="http://localhost**"/>
#</map:selector>
#
which is obviously wrong. So which possibilities do I have? I could not find any samples for this case.
I'd be very happy to get some help,
thank you
Silke
______________________________________________________________________________
Die clevere Geldreserve: der DiBa-Privatkredit. Funktioniert wie ein Dispo,
ist aber viel günstiger! Alle Infos: http://diba.web.de/?mc=021104
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: host selector
Posted by Vadim Gritsenko <va...@verizon.net>.
Silke Schön wrote:
>Thanks a lot, Vadim!
>
>Now I changed my pipeline as you said, using a host selector this time:
>
>#
>#<map:match pattern="**research.pdf">
># <map:generate src="content/research/research.xml"/>
># <map:select type="host">
># <map:when test=localhost">
># <map:transform src="transforms/page-fo.xsl"/>
># </map:when>
># <map:otherwise>
># <map:transform src="transforms/no-access.xsl"/>
># </map:otherwise>
># </map:select>
># <map:serialize type="fo2pdf"/>
>#</map:match>
>#
>
>I want my pdf only to be accessible from the localhost, from other computers a different pdf should be seen.
>But where can I now set that localhost is the "host:port" (port is 80 in my case) in my URI?
>I tried with a unlisted element just below the host selector in my component part:
>
>#
>#<map:selector name="host" src="org.apache.cocoon.selection.HostSelector">
># <host name="localhost" value="http://localhost**"/>
>#</map:selector>
>#
>
>
From Javadoc:
* <p>Configuration:
* <pre>
* <map:selector name="host"
src="org.apache.cocoon.selection.HostSelector">
* <host name="uk-site" value="www.foo.co.uk"/>
* </map:selector>
* </pre>
* <p>Usage:
* <pre>
* <map:select type="host">
* <map:when test="uk-site">
* <map:transform src="stylesheets/page/uk.xsl"/>
* </map:when>
* <map:otherwise>
* <map:transform src="stylesheets/page/us.xsl"/>
* </map:otherwise>
* </map:select>
* </pre>
Which means that this:
<map:selector name="host" src="org.apache.cocoon.selection.HostSelector">
<host name="localhost" value="localhost"/>
</map:selector>
Should work.
Vadim
>which is obviously wrong. So which possibilities do I have? I could not find any samples for this case.
>I'd be very happy to get some help,
>thank you
>Silke
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
how to process based on dtd
Posted by "Harry J. Foxwell" <hf...@cs.gmu.edu>.
I'm just starting a Cocoon project, looking for
docs or preferably example of how to do the following
read & display a URL in a browser window...the
URL contents may include a link to an XML file that
must use a specific DTD. The name of the XML file
can be {anything}.xml. If the XML link uses the
specfied DTD, when the user clicks on the link, transform
it according to an XSL stylesheet on the cocoon server,
else ignore the link.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>