OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 5 Questions: from PHP tags to XIncludes




1. PHP Instructions

I try to generate PHP tags with my driver(as Mauritz advised) but I can't get 
it to work:
    <xsl:template match="processing-instruction('php')">
        <xsl:processing-instruction name="php">
            <xsl:value-of select="."/>
        </xsl:processing-instruction>
    </xsl:template>

    <?php
        $site_root = "../../";
        include "usability.inc";
        include "header.inc";
        ?>

As per:
http://www.dpawson.co.uk/docbook/styling/custom.html#d1075e1385

The resulting html file does not have any php tags -- what's wrong?


2. Invalid XHTML

I have the following in my driver:
    <xsl:template name="user.header.content">
        <p>
            <font size="-2" >
	
	[...]

And the (first p tag) output is:
 <p xmlns="">

Why does it have a namespace tag?


3. Skipping TOCs in sections

My project is a book, but simultaneously are the sections(sect1) shown 
independently on a website as "articles". Some of these are too small for 
having a TOC. While I need to have sections and so forth, the TOC is 
sometimes overkill. How can I specify in the sect1 to not have a TOC? (or 
some other object oriented solution, I want my driver to be generic)


4. Skipping Generation of head/body tags

My sect1s are to integrate into a website where the php tags generates the 
headers/footers of the website; html, head and body tags. This creates two 
problems(what a mess..):

A. The docbook output(xhtml) cannot contain those tags. I cannot find a html 
parameter suitable for this, and I can't figure out how to get the templates 
right -- anyone knows? (possible at all?)

B. Still, I need content from the xhtml output into the head element(or some 
other solution). Specifically, this(everything else can be skipped):
    <style type="text/css">
body { background-image: 
url('http://docbook.sourceforge.net/release/images/draft.png');
       background-repeat: no-repeat;
       background-position: top left;
     }</style>

The last solution is extending the php code to make <head> insertions possible 
and then catch the above with a template, I guess.


5. 

I use XIncludes(with xsltproc/xmllint) in one of my files extensively, so I 
tried putting the namespace declaration in a top element, as a much shorter 
solution compared to declaring it in each element where it's used. But 
xmllint complained. Shouldn't I be able to do like this(plain xml syntax)?

<book xmlns:xi="http://www.w3.org/2001/XInclude";>
[...]
<xi:include  href="kua1.xml" />
[...]
</book>

bash-2.05b$ make check
xmllint --nonet --xinclude --postvalid --noout kua*.xml book.xml
book.xml:5: element book: validity error : No declaration for attribute 
xmlns:xi of element book
Document book.xml does not validate
make: *** [check] Error 3
bash-2.05b$



I import onechunk.xsl, use docbook-xsl 1.65.1 and docbook-xml 4.3.

This heap of questions must be exciting, but I'm stuck. Pointers to documents 
are highly appreciated(but it must really be on a per-sentence basis..).

Thanks in advance,


			Frans








[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]