[Bug 1365] a mechanism for replacing character strings with markup would be useful

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1365


fsasaki@w3.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




------- Additional Comments From fsasaki@w3.org  2005-05-25 06:35 -------
(consensus of i18n-core-wg, telecon 25 may 2005):

We agree that "Markup" is a serialization concept and that facilities for
constructing new nodes belong in the XSLT and XQuery languages rather than in
the function library. In your reply to the original comment you mentioned
character maps and analyze-string from XSLT. It seems that you could achive our
goals, i.e avoiding the private use area, by s.t. like

<xsl:template match="text()">
 <xsl:analyze-string select="." regex="\x{E001}">
  <xsl:matching-substring>
   <myChar type="E001"/>
  </xsl:matching-substring>
</xsl:template>
</xsl:analyze-string>

Input: <p>bla&#xE001;bli</p>
Output: <p>bla<myChar type="E001"/>bli</p>

Is this true? Is there a similar facility in XQuery? It would be great to have
this example as an example in the XSLT 2.0 spec, of course marked as example
(with <div class="example">...). As you mentione elsewhere, examples do not
belong to the normative part of a spec, but - especially in the case of XSLT 2.0
- they make it easier to adopt a standard within wider communities.

Received on Wednesday, 25 May 2005 06:35:16 UTC