Hi, all.

I confess that I'm something of an XSLT newbie. I'm working on customizing the output footers for our PDF documentation, and I'm having a difficult time of selecting the appropriate elements using XSLT.

I'm trying to use the pagesetup.xsl stylesheet as a template, and I've been doing some work trying to construct the appropriate <xsl:value-of> selection. It has been somewhat difficult to use what should be a very simple selection:

   <xsl:value-of select="book/info/productname"/>

The problem is that "book" no longer lives in the default namespace, but (it seems) in the "d" namespace:

<xsl:stylesheet exclude-result-prefixes="d"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:d="http://docbook.org/ns/docbook";

I've tried removing the "exclude-result-prefixes" item and trying several variations on the above value-of query:

   <xsl:value-of select="d:book/info/productname"/>
   <xsl:value-of select="d:/book/info/productname"/>
   <xsl:value-of select="d:book/d:info/d:productname"/>
   <xsl:value-of select="d:productname"/>

And the like. I know that the rule is being triggered because I'm getting textual output in the resulting PDF. But so far I'm mystified about how to go about modifying the header with the product name and version. I am nearly certain the issue is namespace related, because I'm able to get xsltproc to transform the xml file using pretty trivial xsl.

I've attached both.  I ran:

   xsltproc test.xsl 00_XBinder_Master.xml

I'm using Saxon with Oxygen for the transformation.


Best,

Ethan Metsger

--
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng"; type="xml"?>
<book xmlns="http://docbook.org/ns/docbook"; xmlns:xi="http://www.w3.org/2001/XInclude";
    xmlns:xlink="http://www.w3.org/1999/xlink"; version="5.0">

    <info>
        <title>XBinder User's Guide</title>
        <subtitle>Version 1.5x</subtitle>
        <productname>XBinder</productname>
        <productnumber>1.5</productnumber>
    </info>

    <!-- <xi:include href="01_XBinder_Overview.xml"/>
    <xi:include href="02_Using_Xbinder.xml"/>
    <xi:include href="03_Generated_C_C++_Source_Code.xml"/>
    <xi:include href="04_XSD_Simple_Type_to_C_C++_Type_Mappings.xml"/>
    <xi:include href="05_XSD_Complex_Type_to_C_C++_Type_Mappings.xml"/>
    <xi:include href="06_Configuration_File.xml"/>
    <xi:include href="07_Generated_C_Encode_Decode_Functions.xml"/>
    <xi:include href="08_Generated_C++_Class_Methods.xml"/>
    <xi:include href="09_XBinder_C_Runtime_Library.xml"/>
    <xi:include href="10_XML_Run-time_Library_Functions.xml"/>
    <xi:include href="11_EXI_Run-Time_Library_Functions.xml"/>
    <xi:include href="12_C_Common_Runtime_Library.xml"/>
    <xi:include href="13_C++_Built-in_Runtime_Classes.xml"/> -->
</book>

Attachment: test.xsl
Description: Binary data

_______________________________________________
oXygen-user mailing list
[email protected]
http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Reply via email to