Subject: Re: [xsl] xsl:analyze-string trouble or Saxon 7.3 bug? From: "Kurt Cagle" <cagle@xxxxxxxxx> Date: Thu, 19 Dec 2002 15:31:21 -0800 |
I've found the same behavior, btw. ----- Original Message ----- From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, December 19, 2002 3:06 PM Subject: RE: [xsl] xsl:analyze-string trouble or Saxon 7.3 bug? > The correct behavior is that the whole non-matching string should be fed > to the xsl:non-matching-substring instruction. > > Sounds as if I need to add an extra test case. As you know, Saxon 7.x is > "experimental" - which really means I rely a lot on users for the > testing. > > Michael Kay > Software AG > home: Michael.H.Kay@xxxxxxxxxxxx > work: Michael.Kay@xxxxxxxxxxxxxx > > > -----Original Message----- > > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > > Gunther Schadow > > Sent: 19 December 2002 21:39 > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > Subject: [xsl] xsl:analyze-string trouble or Saxon 7.3 bug? > > > > > > Hi, where does the XSLT 2.0 spec say that neither > > matching-substring nor non-matching-substring is executed if > > there is no occurrence of any text matching the regex? Is > > this a bug in Saxon 7.3? > > > > Here is an example: > > > > <xsl:transform version="2.0" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > > > <xsl:variable name="data"> > > Palaver palaver pullover andover hover mover bother brother mother. > > </xsl:variable> > > > > <xsl:template match="/"> > > <xsl:analyze-string select="$data" regex="diagnosis"> > > <xsl:matching-substring> > > <FOUND><xsl:value-of select="."/></FOUND> > > </xsl:matching-substring> > > <xsl:non-matching-substring> > > <NOT><xsl:value-of select="."/></NOT> > > </xsl:non-matching-substring> > > </xsl:analyze-string> > > </xsl:template> > > > > </xsl:transform> > > > > this finds nothing at all, just discards the string, when I > > ask for some regex that is in the string then it works as expected. > > > > I can't find the specification saying that the string not > > matching at all is a special case. And if it does, then isn't > > it a bit awkward? Wouldn't the intuitive behavior be that the > > whole non-matching text gets fed to the > > non-matching-substring side of it? > > > > thanks, > > -Gunther > > > > -- > > Gunther Schadow, M.D., Ph.D. > > gschadow@xxxxxxxxxxxxxxx > > Medical Information Scientist Regenstrief Institute for > > Health Care > > Adjunct Assistant Professor Indiana University School > > of Medicine > > tel:1(317)630-7960 > > http://aurora.regenstrief.org > > > > > > > > XSL-List info and archive: > > http://www.mulberrytech.com/xsl/xsl-list > > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xsl:analyze-string troubl, Michael Kay | Thread | [xsl] Hot to get n records per page, Prateek Gupta |
RE: [xsl] xsl:analyze-string troubl, Michael Kay | Date | [xsl] Hot to get n records per page, Prateek Gupta |
Month |