[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Pattern Matching in XSl - find groups defined in o
At 2012-08-29 16:16 +0000, Kerry, Richard wrote:
Regarding Ken's solutions from last Wednesday (repeated below), why is it : I am positioning the context to be the regex-group(1) string only if that string is non-empty (or, at least, not made entirely of white-space characters; if you want found white-space preserved, then replace normalize-space(.) with string(.) instead). If the string is empty, then I don't want to create the attribute. If the string is non empty, then I want to create the attribute with that string value, which is now the context. In your example, matching "1 Alarm" that does not have any groups will create the empty attribute found-key="" ... which wasn't in your example of what you wanted. I understood you to want found-key= suppressed if there were no search strings in the content. So your suggested code will create the empty found-key="" and mine will not. I hope this is helpful. . . . . . . . . . . Ken
|
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
|