[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Comments in XPath / XSLT regular expressions?
Regular expressions aren't pretty or readable at the best of time, IMHO.
Your idea of using concat combined with XPath comments seems to me to be as good as you might hope for. But you could always write an xsl:function with zero arguments returning an xs:string. That way you can name your regular expression, and use commenting techiniques within the body of the function. You could then group a set of named regular expressions in a module to be xsl:include/imprted. From: Abel Braaksma Online <abel.online@xxxxxxxxx> The regular expression syntax used in XSLT and XPath is largely based on Perl's regular expression syntax. Perl added a very useful construct to their regular expression dialect: the /x modifier. It gives "whitespace freedom" and allows for comments inside regular expressions. It was a great enhancement at the time, especially for moderate to difficult regexes. _________________________________________________________________ Windows Live Messenger has arrived. Click here to download it for free! http://imagine-msn.com/messenger/launch80/?locale=en-gb
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|