cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: XPath transformer?
Date Fri, 30 Aug 2002 08:24:52 GMT
> From: Jeff Turner [mailto:jefft@apache.org] 
> 
> Hi,
> 
> I have a user manual in XML format:
> 
> <document>
>   <body>
>     <s1 title="Introduction">
>       ...
>     </s1>
>     <s1 title="Getting Started">
>       ...
>     </s1>
>     ...
>   </body>
> </document>
> 
> Is there any way that I could extract out just one <s1> element, and
> render it as a page? Ie, like an XPath transformer, that 
> would extract a
> single node:

If you need a pagination based on section elements then it's worth to take a
look at Stefano's PaginatingTransformer. You'll find documentation on it
here: http://xml.apache.org/cocoon/howto/howto-paginator-transformer.html. 


Hope it'll help you to solve your problem and also hope to see it applied to
Forrest. 

--
Konstantin

> 
> <map:match pattern="manual/*">
>   <map:generate src="manual.xml"/>
>   <map:transform type="xpath" select="/document/s1[@title='{1}']"/>
>   <map:transform src="chapter2html.xsl"/>
> </map:match>
> 
> I could then link to chapters with <link
> href="manual/Introduction">introduction</link>.
> 
> Is this possible, or should I write my own transformer?
> 
> thanks,
> 
> --Jeff
> 
> ---------------------------------------------------------------------
> 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