[xsl] attributes and elements

Subject: [xsl] attributes and elements
From: "Bruce D'Arcus" <bdarcus@xxxxxxxxxxx>
Date: Wed, 3 Dec 2003 20:33:40 -0500

I'm trying to figure out how to code documents in such a way that I can generate presentations directly from them. To wit, I want to tag pieces of text with an attribute <phrase condition="screen">like so</phrase>, and to use those for bullet content. The attribute would not be only on the phrase element.

Where I am stuck is getting the content of whatever element has that attribute and attribute value applied. So in the above example, in others, words, I want output something like:

<bullet>like so</bullet>

Below's my template, with the problem area indicated with a --->

Help, please?

The source, BTW, is DocBook, and the target Apple's Keynote XML format.


<xsl:template match="section">
<slide master-slide-id="master-slide-1">
<title visibility="hidden" vertical-alignment="tracks-master"/>
<body visibility="hidden" vertical-alignment="tracks-master"/>
<transition-style type="none" duration="0"/>
<bullet level="0" marker-type="inherited">
<xsl:apply-templates select="title"/>
<bullet level="1" marker-type="inherited">
---> <xsl:if test="*/condition">
---> <xsl:apply-templates/>
---> </xsl:if>

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread