Hi Olivier Olivier Rossel wrote:
> I wish to extract the tag "/task/title" from my XML generated. > I think that using a XSL for that is a bit heavy, so I would like to use > an existing transformer. > > I tried FragmentExtractorTransformer, but I think the name > of the tag that is used for extraction must be declared not in > the map:pipeline (instanciation part), but in the map:components > (declaration part). Am I wrong? > It seems also that the tag must have a namespace or the transformer > does not trigger. > Am I wrong? yes you are !!!! ;-) This transformer does not perform what you want : it replaces named element by xlink locator pointer to the element. AFAIK it's mostly used with SVGs. > > > So I have tried the FilterTransformer. > It seems that 3 parameters must be filled: > element-name (here i said "title") > but also the block number (what is it???) > and the number of rows(???) this transformer is typically written to keep only necessary data from eg. a huge SQL request. So you can tell this transformer to 1st group your data in blocks (the 'count' parameter : 'count' "title"-elements per block), then choose the 'blocknr' block. > > > It seems strange that those very specific transformers exist, and > there is no default > transformer that can accept simply the name of a tag and extract the > sub-tree that corresponds. you only have to write your own... To do this, you can watch any Transformer Java's code... > > > Any information is welcome. ;-) Enjoy... > > > > --------------------------------------------------------------------- > 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: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>