Re: [xsl] Re: ANN: A static code quality tool, for XSLT code

Subject: Re: [xsl] Re: ANN: A static code quality tool, for XSLT code
From: Michael Müller-Hillebrand <mmh@xxxxxxxxxxxxx>
Date: Thu, 1 Jan 2009 17:40:34 +0100
I am following this thread but did not have the time to try it on my
own XSLT files.

Am 31.12.2008 um 09:16 schrieb Mukul Gandhi:

the rule I have implemented currently, will check for true and false
patterns in attribute value.

the rule expression is,

//@*[(contains(., 'true') and not(contains(., 'true()'))) or
(contains(., 'false') and not(contains(., 'false()')))]

Since you require XSLT 2.0 it would be more precise to use regular expression for stuff like this, like

//@*[matches(., 'true[^(] | false[^(]', 'x')]

(I like the x flag, which allows white-space for readability.)

- Michael

--
_______________________________________________________________
Michael M|ller-Hillebrand: Dokumentations-Technologie
Adobe Certified Expert, FrameMaker
Lvsungen und Training, FrameScript, XML/XSL, Unicode
Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747

Current Thread