[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Refactoring parsing code with XSLT 2.0
> I've used tokenize, and I like it. But it seems to only work > where you > can throw away the delimiters. Yes, xsl:analyze-string is much more powerful for this kind of thing. Michael Kay http://www.saxonica.com/ > > Ex. "a b c" --> "a", "b", "c" (with the spaces gone) > > In this case, what I need is > > "3.04in" --> "3.04", "in" > > So I'd need a regex that hits in the right spot, but matches zero > characters. I don't think lookaheads are in the spec. At > least I haven't > found them. Neither are subexpressions that I can tell. > > I still have a feeling that XSLT2 offers some elegant way to > do this, at > least more elegant than my current 11-line <xsl:choose> > construction. Am > I off-key? > > .micah > > M. David Peterson wrote: > > >Micah, > > > >Do you want to potentially keep track of what goes with what... in > >other words do you want to walk away with a set of elements that have > >the value, unit short name, and unit long name for example... > > > >Actually, no matter what your desired output is in 2.0 this type of > >functionality is serviced via the tokenize() function > > > > > > -- > Available for consulting. XForms, web forms, information overload. > Micah Dubinko mailto:micah@xxxxxxxxxxxx > Brain Attic, L.L.C. http://brainattic.info > Yahoo IM: mdubinko +1 623 298 5172 > Learn XForms today: http://xformsinstitute.com
|
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
|