[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: "Themis, Jim" <jthemis@xxxxxx>
Date: Thu, 29 Nov 2007 16:04:32 -0600
Re: Identifying patterns within texts
Not sure the correct way to reply when receiving the digest versus ind.
Posts, but I wanted to add a few things to my original post.......

The two responses I got (thank you....) reiterated the problem that I
identified at the beginning of this project.  How do you identify
"math"?  Since I am working on an educational tool where I am taking an
old format (strings within xml tags)and converting to a new
format(strings within new xml tags), it is tough to identify
What is considered math.  1/2/99  Is that math or a date?  Basically, I
am to decide what represents a mathematical expression and place it
within its own element/tag.  Therefore, the software that processes it,
will be able to display it in a 2-dimensional format....So the algorithm
I come up with must be flexible and expandable.  And it may not be
perfect.... Spaces between text will be a killer....  I guess what is
acceptable will be up to the Systems guys......

However, I have went on the path to choose the XSLT implementation that
was used on the GNOME project (xmlsoft.org) which implements XSLT 1.0.
The engine I chose must be easily added to an existing dll and later
ported to a MAC library (now that Mac is very much Unix :) ).  I needed
something that was free, something the lawyers would approve the
licensing, and something that would be portable among those two
platforms.  I have seen some Java and C++ (Xalan with Xerces)
implementations, but I did not want the added tasks of integration (JNI
and C++ bindings).  Please comment on my logic if you see flaws.

Therefore, the idea of using xsl:analyze-string element or regular
expressions in XSLT 2.0 is not an option right now.


I guess I could use a package like Boost/regex to post process my
converted
Xml.  I assume I can generate the XML from the result tree in memory and
then parse that looking for math using C.

Sorry....Just trying to get my hands around xml, XSL, XSLT, XPath all at
the same time.

Thanks,
Jim Themis

------------------------------------------------------------------------
--------------------
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:

=20

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

=20

=20

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>

=20

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?

=20

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.