W3C home > Mailing lists > Public > xsl-editors@w3.org > January to March 1999

Issue (regex)

From: Christian Wetzel <wetzel@eidon.de>
Date: Tue, 12 Jan 1999 12:47:30 +0100
Message-ID: <369B3652.70D82806@eidon.de>
To: xsl-editors@w3.org
Dear Sir, Dear Madam!

In WD-xsl-19981216 there is an issue about regular expression
capabilities in XSL:

  Issue (regex): Should XSL support regular expressions for matching 
  against any or all of pcdata content, attribute values, attribute 
  names, element type names?
                                        (section 2.6.2. [15])

I've the following suggestion: 
XSL should support regular expressions for matching against all
of #PCDATA content and attribute values (= all possible text data
content), but not for element type names or attribute names.

Consider the following examples: 

- All trademark signs in a text have to be superscripted.
- There's an index element with an attribute which contains
  a list of entry texts for that index marker. The attribute value
  could be a list of alternative entries (separated by ";")
  of the form:
          main entry text:subentry text [sort criteria]
  perhaps containing also special character escapes.
  From that there is a two-level index to be contructed.
- Day, month or year have to be extracted from a simple date element
  ("<date>1998/12/16</date>").

In all cases where text content in elements or attributes has
additional structure which is not marked but has to be distinguished
for transformation or layout, there is the need for additional
functionality to extract parts of the content. Regular expressions
are the tool of choice for that task.

For information which has predefined values like attribute names,
I don't see a need for regular expression search.

I hope to have added a useful thought to the discussion.

Best regards,
  Christian Wetzel
Received on Tuesday, 12 January 1999 06:46:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:49 GMT