[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Identifying patterns within texts

Subject: RE: Identifying patterns within texts
From: cknell@xxxxxxxxxx
Date: Wed, 28 Nov 2007 16:42:34 -0500
RE:  Identifying patterns within texts
You can use regular expression matching in XSLT 2.0 to do this, but a more difficult question is, "How do I accurately recognize a mathematical expression?" For example, suppose you have a statement like, "You should receive your first check in 1/2 weeks.", where the intention is to express "one to two weeks". How will you write a regular expression to know that this is NOT a mathematical expression where "What is 1/2 in decimal format?" contains an identical string that IS a mathematical expression?
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Themis, Jim <jthemis@xxxxxx>
Sent:     Wed, 28 Nov 2007 15:24:09 -0600
To:       <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject:   Identifying patterns within texts

Well I am 4 days into understanding XSLT (and well 4 days into fully
understanding xml).  I am working on a file conversion utility where it
would be an xml to xml conversion.  In my research, I came across XSLT
(along with XSL, XSL-FO,  XSD, DTD, etc).  My question is the following,
if I have an element with text in it:

 

                        <item>What is 1/2 in decimal format?</item>

 

 

Is there a way using a style sheet to actually manipulate the text such
that the resulting output would be:

              < question>What is <math>1/2</math> in decimal
format</item>

 

Basically, I need to search through the text of an element and attempt
to detect math?  Most of the tutorials use xml to HTML as an example and
play with elements and attributes.  I was just wandering if the XSLT
spec allows for this type of searching/parsing?

 

Thanks,

Jim Themis

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.