Timothy Mcginnis | 3 May 2011 14:16
Favicon

table placement

Hello folks,

Its the newbie again.

Are there any guidelines on where in the markup a table should be placed?  I don't mean like under what element but in relation to where the table is referenced in the text so placement is appropriate in the finished product.  Should it be at the beginning of the element the reference appears in?  Or right next to the reference?  

Tim McGinnis
717 720-1962
Web Development
AES/PHEAA

============================================================================== This message contains privileged and confidential information intended for the above addressees only. If you receive this message in error please delete or destroy this message and/or attachments. The sender of this message will fully cooperate in the civil and criminal prosecution of any individual engaging in the unauthorized use of this message. ==============================================================================
Robert Nagle | 3 May 2011 15:49
Picon
Gravatar

epub: can you suppress html TOC?

Here's one thing I noticed.

When I run the epub xsl, it  creates an HTML TOC regardless of whether
you have a
<xsl:param name="generate.toc"> </xsl> statement.

When I commented out that parameter, the html TOC still appears.

Is there any special trick to suppressing the TOC?

Note: in epubs, you don't need an HTML TOC because the ereading device
usually detects the TOC from the toc.ncx . It's not a huge problem to
have the epub start with an actual toc.html (and it's required in
Kindle), but it just gets  in the way when you're reading an epub in
Adobe Digital Editions or the ipad. It's just 2 or 3 pages you don't
actually need.

Any ideas about how to do this? Thanks.

(V1.76.1 version, vanilla xsl)

rj

Robert Nagle
6121 Winsome Ln #56C, Houston TX 77057-5573
(H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
http://www.robertnagle.info
Keith Fahlgren | 3 May 2011 17:40
Picon
Gravatar

Re: epub: can you suppress html TOC?

Try <xsl:param name="generate.toc" select="''"/>
hamilton@xmlpress.net | 3 May 2011 17:59
Favicon
Gravatar

Re: table placement

Tim,

Unless you're using the floatstyle attribute, the table will appear in the text at the place you put it
(i.e., it won't be moved around), so it really depends on how you'd like the table to appear in your output
(i.e., before or after the reference).

HTH

Dick Hamilton
On May 3, 2011, at 5:16 AM, Timothy Mcginnis wrote:

> Hello folks, 
> 
> Its the newbie again. 
> 
> Are there any guidelines on where in the markup a table should be placed?  I don't mean like under what
element but in relation to where the table is referenced in the text so placement is appropriate in the
finished product.  Should it be at the beginning of the element the reference appears in?  Or right next to
the reference?   
> 
> Tim McGinnis
> 717 720-1962
> Web Development
> AES/PHEAA
> 
> ==============================================================================
> This message contains privileged and confidential information intended for the above addressees only. 
If you
> receive this message in error please delete or destroy this message and/or attachments.  
> 
> The sender of this message will fully cooperate in the civil and criminal prosecution of any individual engaging
> in the unauthorized use of this message.
> ==============================================================================
> 
> 
Robert Nagle | 4 May 2011 18:53
Picon
Gravatar

Re: epub: can you suppress html TOC?

I am happy to report that doing this suppresses the TOC.

But I don't understand the syntax or what's happening here.

Why the empty single quotes inside the double quotes? What does that do?

Thanks.

Robert

On Tue, May 3, 2011 at 10:40 AM, Keith Fahlgren <abdelazer <at> gmail.com> wrote:
> Try <xsl:param name="generate.toc" select="''"/>
>

--

-- 
Robert Nagle
6121 Winsome Ln #56C, Houston TX 77057-5573
(H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
http://www.robertnagle.info
Keith Fahlgren | 4 May 2011 19:19
Picon
Gravatar

Re: epub: can you suppress html TOC?

Hi,

On Wed, May 4, 2011 at 9:53 AM, Robert Nagle <idiotprogrammer <at> gmail.com> wrote:
> But I don't understand the syntax or what's happening here.
>
> Why the empty single quotes inside the double quotes? What does that do?

It's just one way of unambiguously selecting an empty string value.
This should also have worked:

  <xsl:param name="generate.toc"></xsl:param> <!-- no space at all -->

The syntax for generate.toc is fairly tricky
(http://www.sagehill.net/docbookxsl/TOCcontrol.html). You could
probably use
'nop' effectively too if you wanted to experiment.

Keith
David Link | 4 May 2011 21:36
Favicon

Re: Qanda: HTML: Not renumber on qandadiv

This worked.  Thank you Bob for your help on this.

I also had to change the level from multiple to any, which I don't understand why.

     <xsl:when test="$deflabel = 'number' and (self::question or self::answer)">
       <xsl:value-of select="$prefix"/>
-      <xsl:number level="multiple" count="qandaentry" format="1"/>
+      <xsl:number level="any" from='qandaset' count="qandaentry" format="1"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>


On Fri, Apr 1, 2011 at 1:52 PM, Bob Stayton <bobs <at> sagehill.net> wrote:
Hi,
As with most numbers generated by DocBook XSL, the stylesheet uses mode="label.markup" for questions and answers.  This template from common/labels.xsl would need to be customized:
 
<xsl:template match="question|answer" mode="label.markup">
 
The xsl:choose in that template handles the various labeling options that are available for qandasets.  I think the last xsl:when handles plain numbering, using xsl:number.  Change the attributes on xsl:number to add a "from" attribute.
 
Bob Stayton
Sagehill Enterprises
bobs <at> sagehill.net
 
 
----- Original Message -----
From: David Link
Sent: Thursday, March 31, 2011 11:58 AM
Subject: [docbook-apps] Qanda: HTML: Not renumber on qandadiv

Hello,

Is there a way to not renumber qandaentries after qandadivs?

Example Representation of XML Docbook:

section [end-of-chapter] (gob-ch01_s08)
.    qandaset (gob-ch01_s08_qs01)
.    .    qandadiv (gob-ch01_s08_qs01_qd01)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd01_qa01)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd01_qa02)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd01_qa03)
.    .    qandadiv (gob-ch01_s08_qs01_qd02)
.    .    .    (Some content here specific to this section)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd02_qa11)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd02_qa12)
.    .    .    qandaentry (gob-ch01_s08_qs01_qd02_qa13)

We like the second qandadiv set of qandaentries to not restart numbering at 1.

We are using docbook-xsl-1.75.2 xhtml-1.1

Thank you
David Link
New York.

Stefan Seefeld | 6 May 2011 21:39

problem with position()

Hello,

I'm trying to define a template to generate a particular xref label for 
DB->XHTML translation.

I'm using this simple template:

<!-- This naming style assumes that a section has at most one
      orderedlist child. -->
<xsl:template match="d:section/d:orderedlist/d:listitem" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   [<xsl:value-of 
select="ancestor::d:section/d:titleabbrev"/>]/<xsl:copy-of 
select="position()"/>
</xsl:template>

However, this always results in a label of the form "[...]/1", i.e. the 
reported position is "1", no matter whether the matched listitem is 
actually the first or not. (Please find attached a little test doc that 
results in:

"Some text referencing [A]/1, [A]/1, and [A]/1."

(where I would expect "[A]/1, [A]/2, and [A]/3".)

Does anyone see the error ? (The links themselves are correct.)

Thanks,
		Stefan

--

-- 

       ...ich hab' noch einen Koffer in Berlin...
Attachment (bug.xml): text/xml, 553 bytes
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
rob.cavicchio | 6 May 2011 22:07

RE: problem with position()

Stefan Seefeld [mailto:stefan <at> seefeld.name] wrote:

> <xsl:template match="d:section/d:orderedlist/d:listitem" mode="xref-to">
>    <xsl:param name="referrer"/>
>    <xsl:param name="xrefstyle"/>
>    [<xsl:value-of
> select="ancestor::d:section/d:titleabbrev"/>]/<xsl:copy-of
> select="position()"/>
> </xsl:template>
> 
> However, this always results in a label of the form "[...]/1", i.e. the
> reported position is "1", no matter whether the matched listitem is
> actually the first or not. (Please find attached a little test doc that
> results in:

The value returned by the "position" function depends on the context in which you retrieve the element. It
can sometimes be a mind-bending exercise to try to figure out exactly what you're supposed to get back from it.

In this case, you might try to simply count how many elements come before it, and add 1. This also lets you be
more specific about what you're counting. So instead of:

	select="position()"

try:

	select="count(preceding-sibling::listitem) + 1"

I didn't test this, but I think it should work.

*************************
Rob Cavicchio
Principal Technical Writer & Information Architect
EMC Captiva
Information Intelligence Group
EMC Corporation
3721 Valley Centre Drive, Ste 200
San Diego, CA 92130

P: (858) 320-1208
F: (858) 320-1010
E: rob.cavicchio <at> emc.com

The opinions expressed here are my personal opinions. Content published here is not read or approved in
advance by EMC and does not necessarily reflect the views and opinions of EMC.
Stefan Seefeld | 6 May 2011 22:42

Re: RE: problem with position()

Rob,

thanks for the quick reply. I tried your suggestion but observed the 
exact same behavior. And indeed, I don't understand how the two could 
differ. After all both operate on the same context, don't they ?

Thanks,
         Stefan

--

-- 

       ...ich hab' noch einen Koffer in Berlin...

Gmane