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

RE: Number of elements with a given attribute

Subject: RE: Number of elements with a given attribute
From: Syd Bauman <Syd_Bauman@xxxxxxxxx>
Date: Mon, 21 Dec 2009 10:08:31 -0500
RE:  Number of elements with a given attribute
This thread has encouraged me to dust off some previous work, tidy it
up a bit, and post it with the hopes that someone with XSLT expertise
will take a look and explain what I could have done better, and why
it would be better.

The stylesheets at
  http://wiki.tei-c.org/index.php/PartLines1.xslt
and
  http://wiki.tei-c.org/index.php/PartLines2.xslt
are proof-of-concept stylesheets that do the same thing in XSLT 1 and
XSLT 2, respectively. Each one reads in a standard TEI P5 file and
generates an XHTML table of the metrical lines within. Each metrical
line has its line number with respect to its parent line group
associated with it, and partial lines are taken into account.

In TEI P5 a metrical line is encoded using an <l> element, line
groups (e.g., stanzas or verses) are encoded using an <lg> element,
and partial lines are indicated in a variety of ways. The method
these stylesheets look for is a part= attribute whose value may be
one of 
* I (for "initial"),
* M (for "medial"), or
* F (for "final").
(NB that the TEI part= attribute may also be 'Y' or 'N', but my
stylesheets ignore these values.) These are, I believe, analogous 
to the OP Faehndrich Philippe's <verse> elements with part= of
"beginning", "continuation", and "end".

For example, if the input TEI document contains

      <lg type="verse">
        <l>Asked a girl what she wanted to be</l>
        <l part="I">She said</l>
        <l part="F"><said>baby, can't you see</said></l>
        <l><said>I wanna be famous, a star on the screen</said></l>
        <l><said>But you can do something in between</said></l>
      </lg>

the corresponding output table will look something like

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.