Apply-Templates

View: New views
3 Messages — Rating Filter:   Alert me  

Apply-Templates

by Alexandre Moraes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A begginner question.
I have this XSL-FO command:

<xsl:apply-templates select="pgblk"/>

and there´s no match template for pgblk.
Just for <para>

and in my XML, I have this hierarchy:

<pgblk>
    <title> balabalaba</title>
    <list1>
        <item1>
            <para>blabla</para>
         </item1>
    </list1>
</pgblk>        

there´s no more call for list1 or item1 template.

The RenderX, will not find the template for <para>, right?
What I have to do to reach the match template para?


Thanks

Alexandre

Parent Message unknown Re: Apply-Templates

by Olaf Wentzien :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Alexandre,

if you use

        <xsl:apply-templates select="//para"/>

all <para> - Tags on any level will be selected.

A good source for questions like this is :

http://www.zvon.org/xxl/XPathTutorial/General/examples.html


Regards Olaf

www-xsl-fo-request@... wrote at 04.07.2007 21:01:54:

>
> A begginner question.
> I have this XSL-FO command:
>
> <xsl:apply-templates select="pgblk"/>
>
> and there´s no match template for pgblk.
> Just for <para>
>
> and in my XML, I have this hierarchy:
>
> <pgblk>
>     <title> balabalaba</title>
>     <list1>
>         <item1>
>             <para>blabla</para>
>          </item1>
>     </list1>
> </pgblk>
>
> there´s no more call for list1 or item1 template.
>
> The RenderX, will not find the template for <para>, right?
> What I have to do to reach the match template para?
>
>
> Thanks
>
> Alexandre
>
> --
> View this message in context: http://www.nabble.com/Apply-Templates-
> tf4025940.html#a11435616
> Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
>
>
>



Re: Apply-Templates

by Alexandre Moraes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

After some tests I think that i know what happens.
If I call pgblk and there´s no match template for the descendants, It will find the <para> template. But if there´s a match template for excample, for <list1> and inside this there´s no call for <para> or the command <apply-template>, it will not proccess the <para> template.

If someone has another idea.

Thanks.


axdmoraes wrote:
A begginner question.
I have this XSL-FO command:

<xsl:apply-templates select="pgblk"/>

and there´s no match template for pgblk.
Just for <para>

and in my XML, I have this hierarchy:

<pgblk>
    <title> balabalaba</title>
    <list1>
        <item1>
            <para>blabla</para>
         </item1>
    </list1>
</pgblk>        

there´s no more call for list1 or item1 template.

The RenderX, will not find the template for <para>, right?
What I have to do to reach the match template para?


Thanks

Alexandre