[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: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 28 Nov 2007 16:40:48 -0500
Re:  Identifying patterns within texts
Jim,

The short answer is that while XSLT 1.0 wasn't designed for this sort of work (which we call "upconversion" for various interesting reasons), XSLT 2.0 does have facilities that make it possible, at least in reasonably well-controlled cases. In particular, have a look at the xsl:analyze-string element.

The more complete answer is that how tractable you find your problem to be will depend more on your definition of the problem itself than on XSLT's native capabilities, and indeed that if you can define the problem sufficiently to get a handle on it at all, XSLT is probably, at this point, as good a technical means as any available for solving it. (Modulo issues of scale, architecture etc.)

So, in your case, one would have to start by defining what you mean by "attempt to detect math". What is this "math" of which you speak, and how do I know it's there?

Cheers,
Wendell

At 04:24 PM 11/28/2007, you wrote:
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





====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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.