[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: ANN: A static code quality tool, for XSLT code

Subject: Re: 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
Re:  Re: ANN: A static code quality tool
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.