[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: two regexp related questions
On 2011-05-19 22:24, Imsieke, Gerrit, le-tex wrote:
Wow, thanks for the feedback. What I did not mention in my mail is that I simplified things; first of all tokenize() won't work, as the separator needs to take context into account (the right hand side can be a quoted string which can contain the ";"). Also, the syntax is slightly more complex; the first component differs from the other components. What I'm trying to parse is an HTTP header field syntax, shared by header fields like Content-Type or Content-Disposition: value = name ( ";" param )* name = token param = token "=" (token | quoted-string) ... (in IETF ABNF speak). The actual code I currently have and which works is in http://greenbytes.de/tech/tc2231/tc2231.xslt to be applied to http://greenbytes.de/tech/tc2231/tc2231.xml I currently have one template for matching the whole expression, which delegates to another one for ( ";" param )* which itself matches the first param, and then recurses. This probably can be simplified as in your "as" example. Thanks for the feedback, Julian
|
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
|