velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wido Hillmann <>
Subject Re: DVSL - replace tags inside unknown parent tags
Date Fri, 06 Dec 2002 10:17:45 GMT
Tank You Bill,

I forgot to say that i like leave the rest of the unknown tree as it is
and copy it to the output.


        <tag-to-replace>other elements</tag-to-replace>


        <replaced-tag>other elements</replaced-tag>

I found a solution in xslt:

<template match="*|@*|text()|processing-instruction()">
    <apply-templates select="*|@*|text()|processing-instruction()"/>

<template match="tag-to-replace">
    <apply-templates select="*|@*|text()|processing-instruction()"/>

The first xslt- template works rekursiv. It copies only one node and
than looks again above all templates. I've tried to copy this
implementation to dvsl. But how can i copy only one unknown node? I
found in the DVSL spec. only directives to copy a hole tree ("deep
copy"). So the following try doesnt work:

$node.copy($node.selectNodes( "." ))##copys again the hole tree


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message