You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Luca Morandini <l....@tin.it> on 2002/02/08 21:57:00 UTC

RE: sitemap

Vishal,

well, you must have a transformation declaration in your pipeline... but you
could choose it dynamically, based on the browser type.

There are example on this in the Cocoon doc (though I never tried them :( ).

Best regards,

P.S.
Since I think this matter may be helpful to others, I cc-ed this message to
the list; please, do the same with your messages.

---------------------------------------------
               Luca Morandini
               GIS Consultant
              lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> Sent: Friday, February 08, 2002 9:48 PM
> To: lmorandini@ieee.org
> Subject: Re: sitemap
>
>
> thank you very much! very helpful.
>
> In the case where I have declared in my xml file different
> stylesheets (e.g. if wap request then wap.xsl, if web request
> then web.xsl, etc.) ... then I don't need to declare this:
>
> <map:transform src="stylesheets/{1}.xsl"/>
>
> right?
>
>
> thanks,
>
>
> Luca Morandini wrote:
> >
> > Vishal,
> >
> > this one matches every XML (like foo.xml or bar.xml) and transform them
> > using a stylesheet with the same name (foo.xsl, bar.xsl).
> >
> > <map:match name="wildcard" pattern="*.xml">
> >         <map:generate type="file" src="documents/{1}.xml"/>
> >         <map:transform src="stylesheets/{1}.xsl"/>
> >         <map:serialize type="html"/>
> > </map:match>
> >
> > Of course, XMLs should be in the documents directory and XSLs in the
> > stylesheet one, both under the sub-sitemap root.
> >
> > Mind, it doesn't match directories, like in "foo/bar.xml"; this could be
> > done using a different matcher... but you got the idea, I hope.
> >
> > Best regards,
> >
> > ---------------------------------------------
> >                Luca Morandini
> >                GIS Consultant
> >               lmorandini@ieee.org
> > http://utenti.tripod.it/lmorandini/index.html
> > ---------------------------------------------
> >
> > > -----Original Message-----
> > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > > Sent: Friday, February 08, 2002 9:28 PM
> > > To: l.moran@tin.it
> > > Subject: sitemap
> > >
> > >
> > > Hi,
> > >
> > > Could you send me an actual sitemap config example that matches
> > > all xml files?
> > >
> > > Thanks,
> > >
> > >
> > > --
> > > ---------------------
> > > Vishal Khatnani
> > > ESIT Group, x40727
> > > Sun Microsystems Inc.
> > > Broomfield, Colorado
> > > ---------------------
> > >
>
> --
> ---------------------
> Vishal Khatnani
> ESIT Group, x40727
> Sun Microsystems Inc.
> Broomfield, Colorado
> ---------------------


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: sitemap

Posted by Vishal Khatnani <Vi...@Sun.COM>.
makes sense now! Thank you very much! it works.



Luca Morandini wrote:
> 
> Vishal,
> 
> they should be under $TOMAT_HOME/webapps/cocoon. The path is relative to the
> cocoon servlet directory.
> 
> Best regards,
> 
> ---------------------------------------------
>                Luca Morandini
>                GIS Consultant
>               lmorandini@ieee.org
> http://utenti.tripod.it/lmorandini/index.html
> ---------------------------------------------
> 
> > -----Original Message-----
> > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > Sent: Friday, February 08, 2002 10:20 PM
> > To: cocoon-users@xml.apache.org
> > Subject: Re: sitemap
> >
> >
> > I have verified that the documents and stylesheets directory are
> > in the ROOT directory under webapps.
> >
> > Still no success!
> >
> > Any ideas??
> >
> > Thanks so much.
> >
> >
> > Vishal Khatnani wrote:
> > >
> > > I did the matching of all xml documents in the documents directory...
> > >
> > > <map:match name="wildcard" pattern="*.xml">
> > >        <map:generate type="file" src="documents/{1}.xml"/>
> > >        <map:transform src="stylesheets/{1}.xsl"/>
> > >        <map:serialize type="html"/>
> > > </map:match>
> > >
> > > but when I point my browser to:
> > >
> > > http://localhost:8080/documents/file.xml
> > >
> > > I get a blank page. Im using netscape 4.75. When I go to view
> > source I can see the actual xml code but it's just not being
> > passed to cocoon!
> > >
> > > Ive tried the samples, and they seem to work.
> > >
> > > What can I do? Please help,
> > > Thanks,
> > >
> > > Luca Morandini wrote:
> > > >
> > > > Vishal,
> > > >
> > > > well, you must have a transformation declaration in your
> > pipeline... but you
> > > > could choose it dynamically, based on the browser type.
> > > >
> > > > There are example on this in the Cocoon doc (though I never
> > tried them :( ).
> > > >
> > > > Best regards,
> > > >
> > > > P.S.
> > > > Since I think this matter may be helpful to others, I cc-ed
> > this message to
> > > > the list; please, do the same with your messages.
> > > >
> > > > ---------------------------------------------
> > > >                Luca Morandini
> > > >                GIS Consultant
> > > >               lmorandini@ieee.org
> > > > http://utenti.tripod.it/lmorandini/index.html
> > > > ---------------------------------------------
> > > >
> > > > > -----Original Message-----
> > > > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > > > > Sent: Friday, February 08, 2002 9:48 PM
> > > > > To: lmorandini@ieee.org
> > > > > Subject: Re: sitemap
> > > > >
> > > > >
> > > > > thank you very much! very helpful.
> > > > >
> > > > > In the case where I have declared in my xml file different
> > > > > stylesheets (e.g. if wap request then wap.xsl, if web request
> > > > > then web.xsl, etc.) ... then I don't need to declare this:
> > > > >
> > > > > <map:transform src="stylesheets/{1}.xsl"/>
> > > > >
> > > > > right?
> > > > >
> > > > >
> > > > > thanks,
> > > > >
> > > > >
> > > > > Luca Morandini wrote:
> > > > > >
> > > > > > Vishal,
> > > > > >
> > > > > > this one matches every XML (like foo.xml or bar.xml) and
> > transform them
> > > > > > using a stylesheet with the same name (foo.xsl, bar.xsl).
> > > > > >
> > > > > > <map:match name="wildcard" pattern="*.xml">
> > > > > >         <map:generate type="file" src="documents/{1}.xml"/>
> > > > > >         <map:transform src="stylesheets/{1}.xsl"/>
> > > > > >         <map:serialize type="html"/>
> > > > > > </map:match>
> > > > > >
> > > > > > Of course, XMLs should be in the documents directory and
> > XSLs in the
> > > > > > stylesheet one, both under the sub-sitemap root.
> > > > > >
> > > > > > Mind, it doesn't match directories, like in
> > "foo/bar.xml"; this could be
> > > > > > done using a different matcher... but you got the idea, I hope.
> > > > > >
> > > > > > Best regards,
> > > > > >
> > > > > > ---------------------------------------------
> > > > > >                Luca Morandini
> > > > > >                GIS Consultant
> > > > > >               lmorandini@ieee.org
> > > > > > http://utenti.tripod.it/lmorandini/index.html
> > > > > > ---------------------------------------------
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > > > > > > Sent: Friday, February 08, 2002 9:28 PM
> > > > > > > To: l.moran@tin.it
> > > > > > > Subject: sitemap
> > > > > > >
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > Could you send me an actual sitemap config example that matches
> > > > > > > all xml files?
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > ---------------------
> > > > > > > Vishal Khatnani
> > > > > > > ESIT Group, x40727
> > > > > > > Sun Microsystems Inc.
> > > > > > > Broomfield, Colorado
> > > > > > > ---------------------
> > > > > > >
> > > > >
> > > > > --
> > > > > ---------------------
> > > > > Vishal Khatnani
> > > > > ESIT Group, x40727
> > > > > Sun Microsystems Inc.
> > > > > Broomfield, Colorado
> > > > > ---------------------
> > > >
> > > > ---------------------------------------------------------------------
> > > > Please check that your question has not already been answered in the
> > > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > > >
> > > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > > For additional commands, e-mail: <co...@xml.apache.org>
> > >
> > > --
> > > ---------------------
> > > Vishal Khatnani
> > > ESIT Group, x40727
> > > Sun Microsystems Inc.
> > > Broomfield, Colorado
> > > ---------------------
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > For additional commands, e-mail: <co...@xml.apache.org>
> >
> > --
> > ---------------------
> > Vishal Khatnani
> > ESIT Group, x40727
> > Sun Microsystems Inc.
> > Broomfield, Colorado
> > ---------------------
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>

-- 
---------------------
Vishal Khatnani
ESIT Group, x40727
Sun Microsystems Inc. 
Broomfield, Colorado
---------------------

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: confusion with C2!

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: vishal@klio.Central.Sun.COM [mailto:vishal@klio.Central.Sun.COM]
On
> 
> Vadim,
> 
> Let me explain. I have worked with java servlets before, and used
> several servlet engines such as jakarta tomcat and iplanet in the
past.

Great, than you should know that if you deploy Cocoon as
C:/Tomcat/webapps/cocoon, then all files goes under this directory -
Cocoon nowadays is trying to behave as regular servlet as much as
possible. Then, to change /cocoon/ part in the URL or to change
directory - just edit server.xml of the Tomcat.

Note: you still can access files outside of Cocoon's context by
specifying absolute file URLs in the sitemap. Try
file://var/tmp/whatever - it should work as well.


> The problem is not deploying these, but understanding specific
> configurations which aren't well documented IMHO.

I totally agree with you here that Cocoon's documentation is not the
best one (to say at least).


> It's been very recent
> since I got into the XML technology (specifically with cocoon) so what
> im really asking for is better sharing of knowledge amongst us...

Use archives, thing is that most questions are already answered on this
list more than one time.

If you had a question, and found an answer in archive, and want to share
this knowledge - send in a patch to the documentation. It always
requires some improvement...

> 
> Thanks for your help,
> Vishal

Regards,
Vadim


> 
> Vadim Gritsenko wrote:
> >
> > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > >
> > > cocoon users,
> > >
> > > Im confused. I don't understand why my xml files have to be in the
> > cocoon
> > > directory e.g. ...webapps/cocoon/proj/file.xml
> >
> > <snip/>
> >
> > > Please help! I am desperate!
> >
> > Dear Vishal,
> >
> > As Sun employee you should teach everybody how to deploy web
> > applications, were to put all the class files, etc. Now I see that
you
> > do not have even slightest understanding of how web applications are
> > working. Before you ask other questions, please read specifications
> > published on Sun's website:
> >
> > http://java.sun.com/products/servlet/download.html
> >
> > Also, consider installing and learning one of the servlet engines
> > available out there. Tomcat is among others available for free
under:
> >
> > http://jakarta.apache.org/tomcat/
> >
> > Regards,
> > Vadim
> >


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: confusion with C2!

Posted by Luca Morandini <l....@tin.it>.
Vishal,

actually, you don't need to have your XML files under the cocoon directory.

For instance, I have my Cocoon directory under
"c:\apps\tomcat\webapps\cocoon", but I have my XML fles under
"d:\noria\noria".
The solution to this is just mounting a sub-sitemap under the main sitemap.

For instance, there is this fragment in my sitemap
("c:\apps\tomcat\webapps\cocoon\sitemap.xmap"):

<map:pipeline>
	<map:match pattern="noria/**">
		<map:mount uri-prefix="noria" src="file:///d:/noria/noria/"
			check-reload="yes"
			reload-method="synchron"/>
	</map:match>
</map:pipeline>

This tells Cocoon to process every URI with "noria/<something>" in it, to
the sub-sitemap located under "d:/noria/noria", which will act as the new
root for XML files.

Best regards,

P.S.
On a personal note: while I think Vadim was a bit too harsh on you, I can't
help noticing that there is FAQ entry about this (named: "How could I have
my Cocoon app in a directory other than
$TOMCAT_HOME/webapps/cocoon/<my-app>?").

Since I wrote that FAQ entry I'd like to know:
1) Did you read it ?
2) If yes, was it helpful to you ?
3) If not, how could it be rewritten in a more meaningful way ?

---------------------------------------------
               Luca Morandini
               GIS Consultant
              lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: vishal@klio.Central.Sun.COM [mailto:vishal@klio.Central.Sun.COM]On
> Behalf Of Vishal Khatnani
> Sent: Saturday, February 09, 2002 8:38 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: confusion with C2!
>
>
> Vadim,
>
> Let me explain. I have worked with java servlets before, and used
> several servlet engines such as jakarta tomcat and iplanet in the past.
> The problem is not deploying these, but understanding specific
> configurations which aren't well documented IMHO. It's been very recent
> since I got into the XML technology (specifically with cocoon) so what
> im really asking for is better sharing of knowledge amongst us...
>
> Thanks for your help,
> Vishal
>
>
>
> Vadim Gritsenko wrote:
> >
> > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > >
> > > cocoon users,
> > >
> > > Im confused. I don't understand why my xml files have to be in the
> > cocoon
> > > directory e.g. ...webapps/cocoon/proj/file.xml
> >
> > <snip/>
> >
> > > Please help! I am desperate!
> >
> > Dear Vishal,
> >
> > As Sun employee you should teach everybody how to deploy web
> > applications, were to put all the class files, etc. Now I see that you
> > do not have even slightest understanding of how web applications are
> > working. Before you ask other questions, please read specifications
> > published on Sun's website:
> >
> > http://java.sun.com/products/servlet/download.html
> >
> > Also, consider installing and learning one of the servlet engines
> > available out there. Tomcat is among others available for free under:
> >
> > http://jakarta.apache.org/tomcat/
> >
> > Regards,
> > Vadim
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
>
> --
> Vishal Khatnani  -- x74287
> Applications Support/Sys Admin
> Infrastructure Support Group (ESIT)
> Sun Microsystems, Inc.
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: confusion with C2!

Posted by Vishal Khatnani <Vi...@Sun.com>.
Vadim,

Let me explain. I have worked with java servlets before, and used
several servlet engines such as jakarta tomcat and iplanet in the past.
The problem is not deploying these, but understanding specific
configurations which aren't well documented IMHO. It's been very recent
since I got into the XML technology (specifically with cocoon) so what
im really asking for is better sharing of knowledge amongst us... 

Thanks for your help,
Vishal



Vadim Gritsenko wrote:
> 
> > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> >
> > cocoon users,
> >
> > Im confused. I don't understand why my xml files have to be in the
> cocoon
> > directory e.g. ...webapps/cocoon/proj/file.xml
> 
> <snip/>
> 
> > Please help! I am desperate!
> 
> Dear Vishal,
> 
> As Sun employee you should teach everybody how to deploy web
> applications, were to put all the class files, etc. Now I see that you
> do not have even slightest understanding of how web applications are
> working. Before you ask other questions, please read specifications
> published on Sun's website:
> 
> http://java.sun.com/products/servlet/download.html
> 
> Also, consider installing and learning one of the servlet engines
> available out there. Tomcat is among others available for free under:
> 
> http://jakarta.apache.org/tomcat/
> 
> Regards,
> Vadim
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>

-- 
Vishal Khatnani  -- x74287
Applications Support/Sys Admin
Infrastructure Support Group (ESIT)
Sun Microsystems, Inc.

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: confusion with C2!

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> 
> cocoon users,
> 
> Im confused. I don't understand why my xml files have to be in the
cocoon
> directory e.g. ...webapps/cocoon/proj/file.xml
 
<snip/>

> Please help! I am desperate!

Dear Vishal, 

As Sun employee you should teach everybody how to deploy web
applications, were to put all the class files, etc. Now I see that you
do not have even slightest understanding of how web applications are
working. Before you ask other questions, please read specifications
published on Sun's website:

http://java.sun.com/products/servlet/download.html

Also, consider installing and learning one of the servlet engines
available out there. Tomcat is among others available for free under:

http://jakarta.apache.org/tomcat/

Regards,
Vadim



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


confusion with C2!

Posted by Vishal Khatnani <Vi...@Sun.COM>.
cocoon users,

Im confused. I don't understand why my xml files have to be in the cocoon directory e.g. ...webapps/cocoon/proj/file.xml

That means I can't render xml files which are under ...webapps/ROOT/XML/ which really poses a problem for me (file layout considerations). 

Also, java servlets on my system are located under .../webapps/java/WEB-INF/classes ... so how do I configure cocoon to:

- render any file under my root directory??
- get the xml output from my java servlet in the java/WEB-INF/classes directory to be passed to cocoon??


I'm sorry if i'm being repetitive, im just somewhat confused with how the virtual path seems to be:

....webapps/ROOT/cocoon instead of the real one which is .... webapps/cocoon/ .... and the configuration issues.

I hope i've expressed myself well. I would appreciate any examples, source code, explanations, etc.... im a newbie in the world of cocoon.


Please help! I am desperate!

Thanks,

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: sitemap

Posted by Luca Morandini <l....@tin.it>.
Vishal,

they should be under $TOMAT_HOME/webapps/cocoon. The path is relative to the
cocoon servlet directory.

Best regards,

---------------------------------------------
               Luca Morandini
               GIS Consultant
              lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------


> -----Original Message-----
> From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> Sent: Friday, February 08, 2002 10:20 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: sitemap
>
>
> I have verified that the documents and stylesheets directory are
> in the ROOT directory under webapps.
>
> Still no success!
>
> Any ideas??
>
> Thanks so much.
>
>
> Vishal Khatnani wrote:
> >
> > I did the matching of all xml documents in the documents directory...
> >
> > <map:match name="wildcard" pattern="*.xml">
> >        <map:generate type="file" src="documents/{1}.xml"/>
> >        <map:transform src="stylesheets/{1}.xsl"/>
> >        <map:serialize type="html"/>
> > </map:match>
> >
> > but when I point my browser to:
> >
> > http://localhost:8080/documents/file.xml
> >
> > I get a blank page. Im using netscape 4.75. When I go to view
> source I can see the actual xml code but it's just not being
> passed to cocoon!
> >
> > Ive tried the samples, and they seem to work.
> >
> > What can I do? Please help,
> > Thanks,
> >
> > Luca Morandini wrote:
> > >
> > > Vishal,
> > >
> > > well, you must have a transformation declaration in your
> pipeline... but you
> > > could choose it dynamically, based on the browser type.
> > >
> > > There are example on this in the Cocoon doc (though I never
> tried them :( ).
> > >
> > > Best regards,
> > >
> > > P.S.
> > > Since I think this matter may be helpful to others, I cc-ed
> this message to
> > > the list; please, do the same with your messages.
> > >
> > > ---------------------------------------------
> > >                Luca Morandini
> > >                GIS Consultant
> > >               lmorandini@ieee.org
> > > http://utenti.tripod.it/lmorandini/index.html
> > > ---------------------------------------------
> > >
> > > > -----Original Message-----
> > > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > > > Sent: Friday, February 08, 2002 9:48 PM
> > > > To: lmorandini@ieee.org
> > > > Subject: Re: sitemap
> > > >
> > > >
> > > > thank you very much! very helpful.
> > > >
> > > > In the case where I have declared in my xml file different
> > > > stylesheets (e.g. if wap request then wap.xsl, if web request
> > > > then web.xsl, etc.) ... then I don't need to declare this:
> > > >
> > > > <map:transform src="stylesheets/{1}.xsl"/>
> > > >
> > > > right?
> > > >
> > > >
> > > > thanks,
> > > >
> > > >
> > > > Luca Morandini wrote:
> > > > >
> > > > > Vishal,
> > > > >
> > > > > this one matches every XML (like foo.xml or bar.xml) and
> transform them
> > > > > using a stylesheet with the same name (foo.xsl, bar.xsl).
> > > > >
> > > > > <map:match name="wildcard" pattern="*.xml">
> > > > >         <map:generate type="file" src="documents/{1}.xml"/>
> > > > >         <map:transform src="stylesheets/{1}.xsl"/>
> > > > >         <map:serialize type="html"/>
> > > > > </map:match>
> > > > >
> > > > > Of course, XMLs should be in the documents directory and
> XSLs in the
> > > > > stylesheet one, both under the sub-sitemap root.
> > > > >
> > > > > Mind, it doesn't match directories, like in
> "foo/bar.xml"; this could be
> > > > > done using a different matcher... but you got the idea, I hope.
> > > > >
> > > > > Best regards,
> > > > >
> > > > > ---------------------------------------------
> > > > >                Luca Morandini
> > > > >                GIS Consultant
> > > > >               lmorandini@ieee.org
> > > > > http://utenti.tripod.it/lmorandini/index.html
> > > > > ---------------------------------------------
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > > > > > Sent: Friday, February 08, 2002 9:28 PM
> > > > > > To: l.moran@tin.it
> > > > > > Subject: sitemap
> > > > > >
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Could you send me an actual sitemap config example that matches
> > > > > > all xml files?
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > >
> > > > > > --
> > > > > > ---------------------
> > > > > > Vishal Khatnani
> > > > > > ESIT Group, x40727
> > > > > > Sun Microsystems Inc.
> > > > > > Broomfield, Colorado
> > > > > > ---------------------
> > > > > >
> > > >
> > > > --
> > > > ---------------------
> > > > Vishal Khatnani
> > > > ESIT Group, x40727
> > > > Sun Microsystems Inc.
> > > > Broomfield, Colorado
> > > > ---------------------
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <co...@xml.apache.org>
> > > For additional commands, e-mail: <co...@xml.apache.org>
> >
> > --
> > ---------------------
> > Vishal Khatnani
> > ESIT Group, x40727
> > Sun Microsystems Inc.
> > Broomfield, Colorado
> > ---------------------
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
>
> --
> ---------------------
> Vishal Khatnani
> ESIT Group, x40727
> Sun Microsystems Inc.
> Broomfield, Colorado
> ---------------------
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: sitemap

Posted by Vishal Khatnani <Vi...@Sun.COM>.
I have verified that the documents and stylesheets directory are in the ROOT directory under webapps. 

Still no success!

Any ideas??

Thanks so much.


Vishal Khatnani wrote:
> 
> I did the matching of all xml documents in the documents directory...
> 
> <map:match name="wildcard" pattern="*.xml">
>        <map:generate type="file" src="documents/{1}.xml"/>
>        <map:transform src="stylesheets/{1}.xsl"/>
>        <map:serialize type="html"/>
> </map:match>
> 
> but when I point my browser to:
> 
> http://localhost:8080/documents/file.xml
> 
> I get a blank page. Im using netscape 4.75. When I go to view source I can see the actual xml code but it's just not being passed to cocoon!
> 
> Ive tried the samples, and they seem to work.
> 
> What can I do? Please help,
> Thanks,
> 
> Luca Morandini wrote:
> >
> > Vishal,
> >
> > well, you must have a transformation declaration in your pipeline... but you
> > could choose it dynamically, based on the browser type.
> >
> > There are example on this in the Cocoon doc (though I never tried them :( ).
> >
> > Best regards,
> >
> > P.S.
> > Since I think this matter may be helpful to others, I cc-ed this message to
> > the list; please, do the same with your messages.
> >
> > ---------------------------------------------
> >                Luca Morandini
> >                GIS Consultant
> >               lmorandini@ieee.org
> > http://utenti.tripod.it/lmorandini/index.html
> > ---------------------------------------------
> >
> > > -----Original Message-----
> > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > > Sent: Friday, February 08, 2002 9:48 PM
> > > To: lmorandini@ieee.org
> > > Subject: Re: sitemap
> > >
> > >
> > > thank you very much! very helpful.
> > >
> > > In the case where I have declared in my xml file different
> > > stylesheets (e.g. if wap request then wap.xsl, if web request
> > > then web.xsl, etc.) ... then I don't need to declare this:
> > >
> > > <map:transform src="stylesheets/{1}.xsl"/>
> > >
> > > right?
> > >
> > >
> > > thanks,
> > >
> > >
> > > Luca Morandini wrote:
> > > >
> > > > Vishal,
> > > >
> > > > this one matches every XML (like foo.xml or bar.xml) and transform them
> > > > using a stylesheet with the same name (foo.xsl, bar.xsl).
> > > >
> > > > <map:match name="wildcard" pattern="*.xml">
> > > >         <map:generate type="file" src="documents/{1}.xml"/>
> > > >         <map:transform src="stylesheets/{1}.xsl"/>
> > > >         <map:serialize type="html"/>
> > > > </map:match>
> > > >
> > > > Of course, XMLs should be in the documents directory and XSLs in the
> > > > stylesheet one, both under the sub-sitemap root.
> > > >
> > > > Mind, it doesn't match directories, like in "foo/bar.xml"; this could be
> > > > done using a different matcher... but you got the idea, I hope.
> > > >
> > > > Best regards,
> > > >
> > > > ---------------------------------------------
> > > >                Luca Morandini
> > > >                GIS Consultant
> > > >               lmorandini@ieee.org
> > > > http://utenti.tripod.it/lmorandini/index.html
> > > > ---------------------------------------------
> > > >
> > > > > -----Original Message-----
> > > > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > > > > Sent: Friday, February 08, 2002 9:28 PM
> > > > > To: l.moran@tin.it
> > > > > Subject: sitemap
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > Could you send me an actual sitemap config example that matches
> > > > > all xml files?
> > > > >
> > > > > Thanks,
> > > > >
> > > > >
> > > > > --
> > > > > ---------------------
> > > > > Vishal Khatnani
> > > > > ESIT Group, x40727
> > > > > Sun Microsystems Inc.
> > > > > Broomfield, Colorado
> > > > > ---------------------
> > > > >
> > >
> > > --
> > > ---------------------
> > > Vishal Khatnani
> > > ESIT Group, x40727
> > > Sun Microsystems Inc.
> > > Broomfield, Colorado
> > > ---------------------
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> 
> --
> ---------------------
> Vishal Khatnani
> ESIT Group, x40727
> Sun Microsystems Inc.
> Broomfield, Colorado
> ---------------------
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>

-- 
---------------------
Vishal Khatnani
ESIT Group, x40727
Sun Microsystems Inc. 
Broomfield, Colorado
---------------------

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: sitemap

Posted by Vishal Khatnani <Vi...@Sun.COM>.
I did the matching of all xml documents in the documents directory...

<map:match name="wildcard" pattern="*.xml">
       <map:generate type="file" src="documents/{1}.xml"/>
       <map:transform src="stylesheets/{1}.xsl"/>
       <map:serialize type="html"/>
</map:match>



but when I point my browser to:

http://localhost:8080/documents/file.xml

I get a blank page. Im using netscape 4.75. When I go to view source I can see the actual xml code but it's just not being passed to cocoon!

Ive tried the samples, and they seem to work.

What can I do? Please help,
Thanks,

Luca Morandini wrote:
> 
> Vishal,
> 
> well, you must have a transformation declaration in your pipeline... but you
> could choose it dynamically, based on the browser type.
> 
> There are example on this in the Cocoon doc (though I never tried them :( ).
> 
> Best regards,
> 
> P.S.
> Since I think this matter may be helpful to others, I cc-ed this message to
> the list; please, do the same with your messages.
> 
> ---------------------------------------------
>                Luca Morandini
>                GIS Consultant
>               lmorandini@ieee.org
> http://utenti.tripod.it/lmorandini/index.html
> ---------------------------------------------
> 
> > -----Original Message-----
> > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > Sent: Friday, February 08, 2002 9:48 PM
> > To: lmorandini@ieee.org
> > Subject: Re: sitemap
> >
> >
> > thank you very much! very helpful.
> >
> > In the case where I have declared in my xml file different
> > stylesheets (e.g. if wap request then wap.xsl, if web request
> > then web.xsl, etc.) ... then I don't need to declare this:
> >
> > <map:transform src="stylesheets/{1}.xsl"/>
> >
> > right?
> >
> >
> > thanks,
> >
> >
> > Luca Morandini wrote:
> > >
> > > Vishal,
> > >
> > > this one matches every XML (like foo.xml or bar.xml) and transform them
> > > using a stylesheet with the same name (foo.xsl, bar.xsl).
> > >
> > > <map:match name="wildcard" pattern="*.xml">
> > >         <map:generate type="file" src="documents/{1}.xml"/>
> > >         <map:transform src="stylesheets/{1}.xsl"/>
> > >         <map:serialize type="html"/>
> > > </map:match>
> > >
> > > Of course, XMLs should be in the documents directory and XSLs in the
> > > stylesheet one, both under the sub-sitemap root.
> > >
> > > Mind, it doesn't match directories, like in "foo/bar.xml"; this could be
> > > done using a different matcher... but you got the idea, I hope.
> > >
> > > Best regards,
> > >
> > > ---------------------------------------------
> > >                Luca Morandini
> > >                GIS Consultant
> > >               lmorandini@ieee.org
> > > http://utenti.tripod.it/lmorandini/index.html
> > > ---------------------------------------------
> > >
> > > > -----Original Message-----
> > > > From: Vishal.Khatnani@Sun.COM [mailto:Vishal.Khatnani@Sun.COM]
> > > > Sent: Friday, February 08, 2002 9:28 PM
> > > > To: l.moran@tin.it
> > > > Subject: sitemap
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Could you send me an actual sitemap config example that matches
> > > > all xml files?
> > > >
> > > > Thanks,
> > > >
> > > >
> > > > --
> > > > ---------------------
> > > > Vishal Khatnani
> > > > ESIT Group, x40727
> > > > Sun Microsystems Inc.
> > > > Broomfield, Colorado
> > > > ---------------------
> > > >
> >
> > --
> > ---------------------
> > Vishal Khatnani
> > ESIT Group, x40727
> > Sun Microsystems Inc.
> > Broomfield, Colorado
> > ---------------------
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>

-- 
---------------------
Vishal Khatnani
ESIT Group, x40727
Sun Microsystems Inc. 
Broomfield, Colorado
---------------------

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>