Hi,

   I'm working on a regular-expression XMLReader implementation and
the stylesheets I'm using are very similar to an XSLT stylesheet. (For
an example see [1]). Basically, instead of a select="/" attribute as
before, what would happen if we simply replaced the "/" (for example)
with a regular expression, say "/A" (start of document).

<stylsheet>
  <xsl:template match="/A"> <!-- reg expression for beginning of whole thing -->
    <such-and-such>
      <xsl:apply-templates select="(?m)^[A-Z ]+$"/>
    </such-and-such>
  </xsl:template>

  <xsl:template match="(?m)^[A-Z]+$">
    <all-caps-line>
      <xsl:value-of select="."/>
    </all-caps-line>
  </xsl:template>
</stylesheet>

What I'm working on right now lacks recursion and perhaps, Lord
willing, I can re-work it sometime in the future, but does replacing
an XPath object with some kind of regular-expression object sound
feasible?

Sincerely,
Elizabeth

[1] 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/regexxmlreader/regexxmlreader/test/test-01.xml?rev=1.1&content-type=text/vnd.viewcvs-markup

Reply via email to