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.
Bruce
<xsl:template match="section">
<slide master-slide-id="master-slide-1">
<drawables>
<title visibility="hidden"
vertical-alignment="tracks-master"/>
<body visibility="hidden"
vertical-alignment="tracks-master"/>
</drawables>
<transition-style type="none" duration="0"/>
<bullets>
<bullet level="0" marker-type="inherited">
<content>
<xsl:apply-templates select="title"/>
</content>
</bullet>
<bullet level="1" marker-type="inherited">
<content>
---> <xsl:if test="*/condition">
---> <xsl:apply-templates/>
---> </xsl:if>
</content>
</bullet>
</bullets>
</slide>
</xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list