Re: [xslt] XPath string functions question.



J.P,

Sure, you could do that.  Hint: you should use

    test="descendant::*[contains(text(), '*/')]"

somewhere in the stylesheet.

By the way, you would defeat the whole purpose of the exercise if your
error comment itself contains a "*/".   =)

Derek


On Sun, 2005-01-09 at 08:23 -0800, J.P. wrote:
> Hi, Derek,
> 
> That works. Thanks.
> 
> That's close to, but not exactly what I want to do. You replace all "*/" 
>     with "star-slash". what I want to do is:
> 
> 1.If the source tree is good, copy it (using copy-of, copy, or any 
> methods that do the job).
> 2.If the source tree or any sub-tree contains "*/", only output some 
> warning message such as:
> /*
>   The source tree contains "*/". Can't not quote it here.
> */
> 
> Can we do that in xslt? Thanks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]