xsl-list
[Top] [All Lists]

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

2009-01-01 11:41:01
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
Lösungen und Training, FrameScript, XML/XSL, Unicode
Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>