I just translated the main guide to extract XPS (I translated the xps into xslt) there's a bit of XPS that I pulled out and translated, but I don't immediately see where to put it, I'm stopping for tonight, so I'll just dump it here ;-)

simon

<title>Extracting Values</title>
<para>
A simple example to get us started, is to use the API to bring in the
title from a docbook article. A docbook article title looks like this:
</para>
<programlisting>
<![CDATA[
<article>
<artheader>
<title>AxKit - A Viable Alternative to Cocoon?</title>
...
]]>
</programlisting>
<para>
The XPath expression to retrieve the text in the title element is:
</para>
<programlisting>

/article/artheader/title/
</programlisting>
<para>
Putting this all together to make this text into the HTML title we get
the following XPathScript stylesheet:
</para>
<programlisting>
<![CDATA[
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">

<xsl:template match="/">
<html>
<head>
<title>
<xsl:value-of select="/article/artheader/title" />
</title>
</head>
<body>
This was a DocBook Article. We're only extracting the title for now!
<p>
The title was:
<xsl:value-of select="/article/artheader/title" />
</p>
</body>
</html>
</xsl:template>

</xsl:stylesheet>
]]>
</programlisting>
---
www.simonwoodside.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to