You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Vladimir I." <vi...@incap.ru> on 2003/02/27 13:46:02 UTC

plz Help me with this problem.

Good morning dudez.

i hope that's not offtopic
ex:
<pd>

<name/>

<limg/>

<simg/>

</pd>

i want apply templates in my order (not 'xml') and all others elements
apply's too (to default template like <xsl:template match="*"/>)
i'd like make anything like this:
<xsl:apply-template select="limg,simg,name,*"/>
or this
<xsl:apply-template><xsl:sort select="limg,simg,name"/></xsl:apply-template>

and also
i not want create special attribute for this or change xml.
elements can be in random order.

thank you.

ps <xsl:apply-template select="limg|simg|name|*"/> - does not work in
propertly order (strange if works)

--
http://www.incap.ru
YarSU faculty of CS.


Re: plz Help me with this problem.

Posted by kl...@attbi.com.
Well, I can understand the desire for beauty. 
I can't think of any other way to define an 
arbitrary order. If you find one, please post 
it back here.

Kevin


Re: plz Help me with this problem.

Posted by "Vladimir I." <vi...@incap.ru>.
<xsl::apply-templates select="*[not(limg|simg)"/>

 k> (I may not have the select statement exactly right.
 k> The basic idea is to select ALL nodes which are not  some specific
 k> set of them.)
i understand thanks
but i think there must be more common way because i do not like write every
apply template and duplicate there in last apply's

 k> What other requirements are there which this fails  to satisfy?
code beauty:)

--
INCAP http://www.incap.ru
YarSU faculty of CS.


Re: plz Help me with this problem.

Posted by kl...@attbi.com.
As I understand the problem, you want to process 
the nodes in a specific order. This order is NOT 
the same as document order, and it is NOT specified 
by any attribute. Given those constraints, I think 
you have to specify it in the stylesheet. A series 
of apply templates will do this. If there are other 
nodes which you want processed in any order, then 
you stick in something like

<xsl:apply-templates select="*[not(limg|simg)"/>

(I may not have the select statement exactly right. 
The basic idea is to select ALL nodes which are not 
some specific set of them.)

What other requirements are there which this fails 
to satisfy?

Kevin

On 27 Feb 2003 at 16:39, Vladimir I. wrote:

> hi
> 
>  k> How about
> <xsl::apply-template select="limg"/>
> <xsl::apply-template select="simg"/>
>  k> etc.?
> and how others ? (if there is would be more than this two nodes) and i'd not
> like this method
> i want process every node _once_
> 
> --
> INCAP http://www.incap.ru
> YarSU faculty of CS.
> 




Re: plz Help me with this problem.

Posted by "Vladimir I." <vi...@incap.ru>.
hi

 k> How about
<xsl::apply-template select="limg"/>
<xsl::apply-template select="simg"/>
 k> etc.?
and how others ? (if there is would be more than this two nodes) and i'd not
like this method
i want process every node _once_

--
INCAP http://www.incap.ru
YarSU faculty of CS.


Re: plz Help me with this problem.

Posted by kl...@attbi.com.
How about
<xsl:apply-template select="limg"/>
<xsl:apply-template select="simg"/>
etc.?

On 27 Feb 2003 at 15:46, Vladimir I. wrote:

> Good morning dudez.
> 
> i hope that's not offtopic
> ex:
> <pd>
> 
> <name/>
> 
> <limg/>
> 
> <simg/>
> 
> </pd>
> 
> i want apply templates in my order (not 'xml') and all others elements
> apply's too (to default template like <xsl:template match="*"/>)
> i'd like make anything like this:
> <xsl:apply-template select="limg,simg,name,*"/>
> or this
> <xsl:apply-template><xsl:sort select="limg,simg,name"/></xsl:apply-template>
> 
> and also
> i not want create special attribute for this or change xml.
> elements can be in random order.
> 
> thank you.
> 
> ps <xsl:apply-template select="limg|simg|name|*"/> - does not work in
> propertly order (strange if works)
> 
> --
> http://www.incap.ru
> YarSU faculty of CS.
>