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

xslt function for generating grammatical paradigms

Subject: xslt function for generating grammatical paradigms
From: David J Birnbaum <djbpitt+xml@xxxxxxxx>
Date: Mon, 21 Apr 2008 08:10:44 -0400
 xslt function for generating grammatical paradigms
Dear XSLT List,

>David> What I'm groping for, then, is an elegant rule-based
>David> function that lets me write a small number of rules by
>David> defining classes of letters to which they apply, something
>David> like "after 'S', 'Z', 'C', 'St', and Zd', 'y' is replaced
>David> by 'E'."

> Have you checked to see if the classes can be deduced from the Unicode
> database? In Unicode 5.1.0, this is now available as an XML dataset.

The classes are not amenable to definition in terms of Unicode properties; in linguistic terms they are along the lines of "palatal fricatives and affricates." (In an effort to avoid using actual medieval Cyrillic characters in my email, including Unicode 5.1 characters, I converted my real problem into a hypothetical one using ASCII letters, which had the unfortunate side-effect of obscuring that detail. In real life in the example above, "S" and "Z" stand for voiceless and voiced palatal fricatives, "C" is a voiceless palatal affricate, "y" is a high back tense vowel, and "E" is a front nasal vowel.)

But your suggestion points to a way of conceptualizing the problem that occurred to me, but that I didn't know how to implement using XPath/XSLT, viz., can I define a class of items and then write a conditional rule that tests whether a character is a member of that class? That is, using the example above, can I define $palatal as the set of ('S', 'Z', 'C', 'St', and 'Zd') and then write a rule along the lines of "in any sequence of a member of the $palatal class followed by '-' followed by 'y', the '-' is deleted and the 'y' is replaced by 'E'"?

Sincerely,

David
djbpitt+xml@xxxxxxxx

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-2013 All Rights Reserved.