cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: i18n inside XSL
Date Mon, 15 Jul 2002 09:46:15 GMT
> From: Albert Cervera Areny [mailto:informatic@sedifa.com] 
> 
> I think I didn't explain it very well.
> The thing is that I've got an XSL file that calls throw
> <xsl:apply-templates select="document($document)"/>
> Where $document is a parameter I give to the stylesheet 
> (forget about the
> thing of the HTML, it's as you said I can't modify it).How 
> would you translate the XML file pointed by $document?

I would not say that using document() function is not a good idea for
serving content, maybe you have reasons for doing so. However, I'd suggest
that you rething that approach and try to perform it using the sitemap.

I don't know how document() function loads files, but if it does not use
Cocoon's source resolver then I don't see how you can achieve what you need.
Just a guess: try to point the document() to a Cocoon pipeline and not the
file directly using 'cocoon://' protocol, e.g.:
document('cocoon://{$document}'). 

Konstantin

> 
> >> From: Albert Cervera Areny [mailto:informatic@sedifa.com]
> >>
> >> Hi,
> >>   I've been able to use an HTML file (which I've not 
> designed) as my
> >>   stylesheet and in which I call each XML document I want to
> >> process. I
> >>   get this XML file as a parameter to the stylesheet.  The
> >> thing is now that I'd like to be able to translate the file I'm
> >>   gonna call and it is a problem because the i18n provided by
> >> cocoon is a
> >>   transformer and should be called within the 'sitemap.xmap'
> >> I think this is not the way cocoon it's been designed to 
> work but I'm
> >>   really tight to the HTML file the web designers have made
> >> me available.
> >
> > I don't quite understand how are you going to use an HTML file as a
> > stylesheet.
> >
> > And would you serve your content without sitemap.xmap? From what you
> > tell I understood this:
> > 1) you have a stylesheet that you can't change
> > 2) you get your XML file name from a request parameter
> > 3) the XML file should be translated before transformation by the
> > stylesheet Correct?
> >
> > If so, then everything can be perfectly done in the sitemap. Simply
> > setup a pipeline using RequestParameterAction (or an RequestInput
> > module in Cocoon 2.1) that will propogate the filename to 
> the sitemap.
> > The rest is classics: 1) generate you file
> > 2) i18n
> > 3) xslt
> >
> > And that's all.
> >
> > Does this solve your issue?
> >
> > Konstantin
> >
> >
> >>   Any suggestion will be appreciated.
> >> Thanks.
> >>
> >>
> >> --
> >> Albert Cervera Areny
> >> Dept. Informàtica Sedifa, S.L.
> >>
> >>
> >>
> >> 
> ---------------------------------------------------------------------
> >> 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:     <cocoon-users-unsubscribe@xml.apache.org>
> >> For additional commands, e-mail:   
> <cocoon-users-help@xml.apache.org>
> >>
> >
> > 
> ---------------------------------------------------------------------
> > 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:     <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail:   
> <cocoon-users-help@xml.apache.org>
> 
> 
> -- 
> Albert Cervera Areny
> Dept. Informàtica Sedifa, S.L.
> 
> 
> 
> ---------------------------------------------------------------------
> 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:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message