Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Use of <sect1> instead of <section> in DocBook
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 37 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nicholas C. Zakas  
View profile  
 More options Jan 4 2012, 2:06 pm
From: "Nicholas C. Zakas" <nicholas.c.za...@gmail.com>
Date: Wed, 4 Jan 2012 11:06:44 -0800 (PST)
Local: Wed, Jan 4 2012 2:06 pm
Subject: Use of <sect1> instead of <section> in DocBook
Hi,

Is there a way to tell Pandoc to use <sect1>, <sect2>, etc. for
DocBook format instead of <section>?

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fiddlosopher  
View profile  
 More options Jan 4 2012, 2:48 pm
From: fiddlosopher <fiddlosop...@gmail.com>
Date: Wed, 4 Jan 2012 11:48:41 -0800 (PST)
Local: Wed, Jan 4 2012 2:48 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
There's no configuration option for this.  I could change pandoc's
behavior if there were a good reason to do so.  What are the
differences
between <sect1> etc. and <section>?  Why do you need one rather than
the
other?

John

On Jan 4, 11:06 am, "Nicholas C. Zakas" <nicholas.c.za...@gmail.com>
wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miek Gieben  
View profile  
 More options Jan 4 2012, 2:50 pm
From: Miek Gieben <m...@miek.nl>
Date: Wed, 4 Jan 2012 20:50:11 +0100
Local: Wed, Jan 4 2012 2:50 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook

[ Quoting <nicholas.c.za...@gmail.co> at 11:06 on Jan  4 in "Use of <sect1> inste..." ]

> Hi,

> Is there a way to tell Pandoc to use <sect1>, <sect2>, etc. for
> DocBook format instead of <section>?

There's xslt for that...

grtz Miek

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicholas C. Zakas  
View profile  
 More options Jan 4 2012, 7:35 pm
From: "Nicholas C. Zakas" <nicholas.c.za...@gmail.com>
Date: Wed, 4 Jan 2012 16:35:38 -0800 (PST)
Local: Wed, Jan 4 2012 7:35 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
From my [admittedly limited] understanding, <sect1> indicates the
canonical outermost section, <sect2> can only appear in <sect1> and
indicates subsections.

My personal preference would be to just use <section>, however,
O'Reilly requires books to be written using the <sect1> and associated
elements instead.

I think it would be really useful to have a configuration option for
this.

-N

On Jan 4, 11:48 am, fiddlosopher <fiddlosop...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
HansBKK  
View profile   Translate to Translated (View Original)
 More options Jan 4 2012, 10:22 pm
From: HansBKK <hans...@gmail.com>
Date: Wed, 4 Jan 2012 19:22:40 -0800 (PST)
Local: Wed, Jan 4 2012 10:22 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook

I believe the SectX tags are actually more widely used than Section. From
the "definitive guide" at docbook.org:

There are three types of sectioning elements in DocBook:

   -

   Explicitly numbered sections, Sect1<http://docbook.org/tdg/en/html/sect1.html>
   …Sect5 <http://docbook.org/tdg/en/html/sect5.html>, which must be
   properly nested and can only be five levels deep.
   -

   Recursive Section <http://docbook.org/tdg/en/html/section.html>s, which
   are an alternative to the numbered sections and have unbounded depth.
   -

   SimpleSect <http://docbook.org/tdg/en/html/simplesect.html>s, which are
   terminal. SimpleSect <http://docbook.org/tdg/en/html/simplesect.html>s
   can occur as the “leaf” sections in either recursive sections or any of
   the numbered sections, or directly in components.

Section <http://docbook.org/tdg/en/html/section.html>s may be more
convenient than numbered sections in some authoring environments because
they can be moved around in the document hierarchy without renaming.

As O'Reilly is the 800 lb gorilla in DocBook usage, it would be very useful
for Pandoc to support its specs as a general goal; this will IMO be
increasingly valuable as ora continues to "open up" various elements of its
very sophisticated in-house processes and toolchains.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John MacFarlane  
View profile  
 More options Jan 5 2012, 1:50 pm
From: John MacFarlane <fiddlosop...@gmail.com>
Date: Thu, 5 Jan 2012 10:50:40 -0800
Local: Thurs, Jan 5 2012 1:50 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
I don't have any problem changing from <section> to <sectN> tags
in the docbook writer, if that would be more useful to the people
who use it.  If anyone has objections, speak up now!

John

+++ HansBKK [Jan 04 12 19:22 ]:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miek Gieben  
View profile  
 More options Jan 5 2012, 3:59 pm
From: Miek Gieben <m...@miek.nl>
Date: Thu, 05 Jan 2012 21:59:28 +0100
Local: Thurs, Jan 5 2012 3:59 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
I object. Because of the max. depth of 5, which isn't there when using section.

Sent from my Android device


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miek Gieben  
View profile  
 More options Jan 5 2012, 5:00 pm
From: Miek Gieben <m...@miek.nl>
Date: Thu, 05 Jan 2012 23:00:19 +0100
Local: Thurs, Jan 5 2012 5:00 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
I still don't see why the original problem can't be solved with a little bit of xlst?

Sent from my Android device


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John MacFarlane  
View profile  
 More options Jan 5 2012, 4:26 pm
From: John MacFarlane <fiddlosop...@gmail.com>
Date: Thu, 5 Jan 2012 13:26:29 -0800
Local: Thurs, Jan 5 2012 4:26 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
What if pandoc did this?

<sect1>
  <sect2>
    <sect3>
      <sect4>
        <sect5>
          <section>
            <section>
              ...

Does that work?

+++ Miek Gieben [Jan 05 12 21:59 ]:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John MacFarlane  
View profile   Translate to Translated (View Original)
 More options Jan 5 2012, 5:18 pm
From: John MacFarlane <fiddlosop...@gmail.com>
Date: Thu, 5 Jan 2012 14:18:33 -0800
Local: Thurs, Jan 5 2012 5:18 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
+++ Miek Gieben [Jan 05 12 23:00 ]:

> I still don't see why the original problem can't be solved with a little bit of xlst?

It could.  But that is not by itself an argument against making the
change. After all, your consideration cuts both ways: <sectN> tags can
be changed into <section> tags by xslt too -- or more simply with

    | sed -e 's/<sect[0-9]/<section/g'

If use of <sectN> tags is more standard/normal/preferred, then I think
it would be better for pandoc to use them.  I'm asking for input
partly because I don't use docbook myself.  Several people are using
pandoc to write for O'Reilly, and for them <sectN> would be better.

John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
HansBKK  
View profile  
 More options Jan 5 2012, 9:27 pm
From: HansBKK <hans...@gmail.com>
Date: Thu, 5 Jan 2012 18:27:40 -0800 (PST)
Local: Thurs, Jan 5 2012 9:27 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook

If either/or is a problem, could pandoc do the below as result of a --sectN
option?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colin Adams  
View profile  
 More options Jan 6 2012, 1:31 am
From: Colin Adams <colinpaulad...@gmail.com>
Date: Fri, 6 Jan 2012 06:31:29 +0000
Local: Fri, Jan 6 2012 1:31 am
Subject: Re: Use of <sect1> instead of <section> in DocBook

On 5 January 2012 22:18, John MacFarlane <fiddlosop...@gmail.com> wrote:

I used to use docbook a long time again. <section> was introduced as an
improvement over sectN, and it was recommended for all to switch, i seem to
remember. So changing from section to sectN is a move in the wrong
direction, i think.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
HansBKK  
View profile  
 More options Jan 6 2012, 2:05 am
From: HansBKK <hans...@gmail.com>
Date: Thu, 5 Jan 2012 23:05:18 -0800 (PST)
Local: Fri, Jan 6 2012 2:05 am
Subject: Re: Use of <sect1> instead of <section> in DocBook

There have been back-and-forths<http://lists.oasis-open.org/archives/docbook/201105/msg00024.html>on this overthe years<http://tldp.org/LDP/LDP-Author-Guide/html/section.html>,
without consensus<http://lists.oasis-open.org/archives/docbook/201105/msg00029.html>- here's a
recent summary <http://documentingit.blogspot.com/2011/06/sections.html>.

For what it's worth, asciidoc uses sectN<http://www.methods.co.nz/asciidoc/userguide.html#X93>

If it's actually very easy to take care of this with an external transform
then I guess it's not worth the trouble to give an option, but for me I
haven't got the hang of xslt at all yet, and it's non-triviality is IMO a
good example of the central reason behind the existence of tools like
pandoc and asciidoc.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miek Gieben  
View profile  
 More options Jan 6 2012, 5:52 am
From: Miek Gieben <m...@miek.nl>
Date: Fri, 6 Jan 2012 11:52:04 +0100
Local: Fri, Jan 6 2012 5:52 am
Subject: Re: Use of <sect1> instead of <section> in DocBook

[ Quoting <hans...@gmail.com> at 23:05 on Jan  5 in "Re: Use of <sect1> i..." ]

> For what it's worth, asciidoc uses sectN

The version I'm running here (8.6.3-1) outputs "simpara".

grtz Miek

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miek Gieben  
View profile  
 More options Jan 6 2012, 5:55 am
From: Miek Gieben <m...@miek.nl>
Date: Fri, 6 Jan 2012 11:55:00 +0100
Subject: Re: Use of <sect1> instead of <section> in DocBook

[ Quoting <hans...@gmail.com> at 23:05 on Jan  5 in "Re: Use of <sect1> i..." ]

> the hang of xslt at all yet, and it's non-triviality is IMO a good example of
> the central reason behind the existence of tools like pandoc and asciidoc.

Sorry for mailing twice.

This xslt transforms from <section> to <sect1> and was the most difficult
to create:

    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="section">
    <xsl:variable name="i" select="count(ancestor::node())"/>
      <xsl:element name="sect{$i}"><xsl:apply-templates/></xsl:element>
    </xsl:template>
    </xsl:stylesheet>

And this xslt transforms from <sect1> to <section>:

    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="sect1 | sect2 | sect3 | sect4 | sect5">
        <section><xsl:apply-templates/></section>
    </xsl:template>
    </xsl:stylesheet>

 grtz,

--
    Miek

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicholas C. Zakas  
View profile  
 More options Jan 6 2012, 2:40 pm
From: "Nicholas C. Zakas" <nicholas.c.za...@gmail.com>
Date: Fri, 6 Jan 2012 11:40:46 -0800 (PST)
Local: Fri, Jan 6 2012 2:40 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
I didn't want to start a war about which format is better. I'd be
quite happy if there was a CLI option that allows me to opt into using
<sectN> instead of <section>.

-N

On Jan 6, 2:55 am, Miek Gieben <m...@miek.nl> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
HansBKK  
View profile  
 More options Jan 6 2012, 4:53 pm
From: HansBKK <hans...@gmail.com>
Date: Fri, 6 Jan 2012 13:53:00 -0800 (PST)
Subject: Re: Use of <sect1> instead of <section> in DocBook

Thanks very much for this example, I've noted it for when I get back to
looking at learning xslt.

What would the result be for <section>s nested more than five deep?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John MacFarlane  
View profile  
 More options Jan 6 2012, 5:45 pm
From: John MacFarlane <fiddlosop...@gmail.com>
Date: Fri, 6 Jan 2012 14:45:53 -0800
Local: Fri, Jan 6 2012 5:45 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
+++ Nicholas C. Zakas [Jan 06 12 11:40 ]:

> I didn't want to start a war about which format is better. I'd be
> quite happy if there was a CLI option that allows me to opt into using
> <sectN> instead of <section>.

Pandoc already has so many command-line options; I'd rather not
introduce new ones unless it's necessary. Given the ease of translating
from one section format to the other, I don't see that a new option is
warranted. That's why I posed the question as an either-or.

John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce  
View profile  
 More options Jan 6 2012, 6:06 pm
From: Bruce <bdarcus.li...@gmail.com>
Date: Fri, 6 Jan 2012 15:06:10 -0800 (PST)
Local: Fri, Jan 6 2012 6:06 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook

On Jan 6, 5:45 pm, John MacFarlane <fiddlosop...@gmail.com> wrote:

> +++ Nicholas C. Zakas [Jan 06 12 11:40 ]:

> > I didn't want to start a war about which format is better. I'd be
> > quite happy if there was a CLI option that allows me to opt into using
> > <sectN> instead of <section>.

> Pandoc already has so many command-line options; I'd rather not
> introduce new ones unless it's necessary. Given the ease of translating
> from one section format to the other, I don't see that a new option is
> warranted. That's why I posed the question as an either-or.

The numbered section approach is the legacy approach, and is a
consequence of technical limitations of DTD technology that the RELAX
NG does not have [1]. I believe at one time, DB 5 had dropped support
for numbered sections, in fact.

For that reason, I tend to lean towards preferring the current
behavior.

Bruce

[1] http://norman.walsh.name/2003/05/29/moredocbook


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
HansBKK  
View profile  
 More options Jan 7 2012, 1:53 am
From: HansBKK <hans...@gmail.com>
Date: Fri, 6 Jan 2012 22:53:08 -0800 (PST)
Local: Sat, Jan 7 2012 1:53 am
Subject: Re: Use of <sect1> instead of <section> in DocBook

On Jan 6, 5:45 pm, John MacFarlane <fiddlo...@gmail.com> wrote:

> > Pandoc already has so many command-line options; I'd rather not
> introduce new ones unless it's necessary. Given the ease of translating  
> from one section format to the other, I don't see that a new option is
> warranted. That's why I posed the question as an either-or.

Fair enough.

On Saturday, January 7, 2012 6:06:10 AM UTC+7, Bruce wrote:
> I believe at one time, DB 5 had dropped support for numbered sections, in
> fact.

I've researched a bit more thoroughly on this topic, but didn't find any
indication of sectN being in any way legacy, much less anything about DB
ever dropping it - the link you cited was Norm speculating on a
hypothetical "start from scratch" standard to replace DB as a whole, not to
do with DB itself.

In fact many authors state that although <section> is more convenient for
DB newbies, <sectN> is more powerful, allowing different levels to have
separate structures, providing better search/retrieval capabilities for
DB-native tools, and much better orientation ("situational awareness")
while authoring directly in XML - most agreed that better native-DB editors
would reduce the need for explicit section levels, but that many still find
them necessary given the lack thereof.

--------------------

I still dread the day I have to figure out xslt scripting 8-) and thus
would like to make my final (I promise) points on this

Most importantly:

  - There is no difference in formatting output or loss of semantic
resolution/fidelity going from section-->sectN, but there is going the
other way

  - The slight disadvantage of using sectN (author inconvenience when
working directly in source XML) is completely taken away by using Pandoc.

  - Many large publishers standardize on DocBook, but O'Reilly is the most
influential regarding the standard itself, having sponsored its creation
before setting up the standards bodies.

  - It is IMO poor practice to have such a deeply nested structure, and
many tools apparently choke when they get too deep - I imagine that is the
real reason for ORA's requirement, structural styleguide enforcement 8-)

  - Converting from this:
<sect1>
  <sect2>
    <sect3>
      <sect4>
        <sect5>

to only <section> would be a simple search-and-replace, whereas going the
other way requires xslt scripting, presumably more complex than Miek's
example to handle the case where the author (IM unreasonably) created
<section>s nesting more than five deep.

--------------------

I did come across one issue against such a change - it apparently isn't
compliant for <section> to be nested within any level of <sectN>, so John's
proposed behavior above won't work.

Therefore the only option I can see that wouldn't require a command-line
option would be for Pandoc to count the depth and use <sectN> if it's 5 or
less deep (could be 6 if the bottom-most were simplesect<http://www.docbook.org/tdg5/en/html/simplesect.html>,
but these don't show up in the ToC), and otherwise use <section>s.

I suspect a --sectN flag would be easier, but of course doing nothing is
easiest 8-)

'nuff said on this I promise. . .


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miek Gieben  
View profile  
 More options Jan 7 2012, 5:06 am
From: Miek Gieben <m...@miek.nl>
Date: Sat, 7 Jan 2012 11:06:13 +0100
Local: Sat, Jan 7 2012 5:06 am
Subject: Re: Use of <sect1> instead of <section> in DocBook

[ Quoting <hans...@gmail.com> at 13:53 on Jan  6 in "Re: Use of <sect1> i..." ]

> Thanks very much for this example, I've noted it for when I get back to looking
> at learning xslt.

> What would the result be for <section>s nested more than five deep?

Those would be numbered sec6,sec7... Unless you test for that too. These
switches to <section> for anything above sec5;

    <?xml version="1.0"?>    
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="section">
    <xsl:variable name="i" select="count(ancestor::node())"/>
        <xsl:choose>        
            <xsl:when test="$i > 5">
                <section><xsl:apply-templates/></section>
            </xsl:when>      
            <xsl:otherwise>  
                <xsl:element name="sect{$i}"><xsl:apply-templates/></xsl:element>
            </xsl:otherwise>
        </xsl:choose>        
    </xsl:template>          
    </xsl:stylesheet>        

Note: I didn't understand xslt two months ago and started using it
to create Pandoc2rfc[1]. It took me one afternoon to get the basics. It
is easier then I ever imagined.

[1]: https://github.com/miekg/pandoc2rfc

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce  
View profile  
 More options Jan 7 2012, 10:23 am
From: Bruce <bdarcus.li...@gmail.com>
Date: Sat, 7 Jan 2012 07:23:18 -0800 (PST)
Local: Sat, Jan 7 2012 10:23 am
Subject: Re: Use of <sect1> instead of <section> in DocBook

On Jan 7, 1:53 am, HansBKK <hans...@gmail.com> wrote:

> On Saturday, January 7, 2012 6:06:10 AM UTC+7, Bruce wrote:
> > I believe at one time, DB 5 had dropped support for numbered sections, in
> > fact.

> I've researched a bit more thoroughly on this topic, but didn't find any
> indication of sectN being in any way legacy, much less anything about DB
> ever dropping it - the link you cited was Norm speculating on a
> hypothetical "start from scratch" standard to replace DB as a whole, not to
> do with DB itself.

...

I base this on two things: Norm very clearly stating in 2003 that
numbered sections were a consequence of technical limitations, and a
later post where he notes adding them back to the DB5 schema based on
"popular request." E.g. at one point he did remove them.

And the nested section element certainly is much newer.

Hence my statement.

I think numbered sections are a bit of a hack myself that aren't very
authoring friendly (yes, I've written a book using DocBook, and I
prefer being able to move around structure without changing the actual
nodes).

But admittedly this is a YMMV situation, and there are some mild
processing advantages to numbered sections.

Bruce


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
HansBKK  
View profile  
 More options Jan 7 2012, 10:33 am
From: HansBKK <hans...@gmail.com>
Date: Sat, 7 Jan 2012 07:33:40 -0800 (PST)
Local: Sat, Jan 7 2012 10:33 am
Subject: Re: Use of <sect1> instead of <section> in DocBook

On Saturday, January 7, 2012 5:06:13 PM UTC+7, Miek Gieben wrote:

> > What would the result be for <section>s nested more than five deep?

> Those would be numbered sec6,sec7... Unless you test for that too. These
> switches to <section> for anything above sec5;

Unfortunately, unless I'm reading the spec wrong, a <section> can't have a
<sectN> for a parent.

And sect6+ isn't allowed at all, so I'm afraid the user should just somehow
be notified to correct the problem manually and then try again. 8-(

You get one more level by using simplesect<http://www.docbook.org/tdg5/en/html/simplesect.html>at the bottom, just note these don't show in the ToC (even 5 is too deep
IMO anyway).

And thanks for the reassurances wrt xslt.

BTW can you explain about pandoc2rfc? I'm curious about your use of
AsciiDoc together with Pandoc, your readme says the chain is:

adoc --> dbXML --> rfc

is that right?

I wasn't aware that Pandoc can take DocBookXML as an input, thought that
was an output format only?

I would love to see something go from DocBookXML back to AsciiDoc, a couple
of people apparently tried over the years but didn't ever get it quite
done. . .

And I think I've mentioned that either AsciiDoc or DocBookXML to
reST/Sphinx would be so cool, but now we're getting waay OT. 8-)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miek Gieben  
View profile  
 More options Jan 7 2012, 12:03 pm
From: Miek Gieben <m...@miek.nl>
Date: Sat, 7 Jan 2012 18:03:25 +0100
Local: Sat, Jan 7 2012 12:03 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook

[ Quoting <hans...@gmail.com> at 07:33 on Jan  7 in "Re: Use of <sect1> i..." ]

>     Those would be numbered sec6,sec7... Unless you test for that too. These
>     switches to <section> for anything above sec5;

> Unfortunately, unless I'm reading the spec wrong, a <section> can't have a
> <sectN> for a parent.

> And sect6+ isn't allowed at all, so I'm afraid the user should just somehow be
> notified to correct the problem manually and then try again. 8-(

> You get one more level by using simplesect at the bottom, just note these don't
> show in the ToC (even 5 is too deep IMO anyway).

That's way I'm against <sectN> output from pandoc, <section> doesn't have
these limitions. When writing technical documents deep sections are sometimes
needed.

> BTW can you explain about pandoc2rfc? I'm curious about your use of AsciiDoc
> together with Pandoc, your readme says the chain is:

> adoc --> dbXML --> rfc

> is that right?

> I wasn't aware that Pandoc can take DocBookXML as an input, thought that was an
> output format only?

No, the chain is:

[adoc | pandoc ] -> dbXML -> xslt -> rfc

I just modified my xslt stylesheet so that I can also handle the DocBook as
outputted by AsciiDoc. Then this is translated to XML the xml2rfc can
understand. And then xml2rfc transforms it to ascii text.

> I would love to see something go from DocBookXML back to AsciiDoc, a couple of
> people apparently tried over the years but didn't ever get it quite done. . .

Hmmm, xslt is written for just such a task...

> And I think I've mentioned that either AsciiDoc or DocBookXML to reST/Sphinx
> would be so cool, but now we're getting waay OT. 8-)

:-)

grtz Miek

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicholas C. Zakas  
View profile  
 More options Jan 24 2012, 9:12 pm
From: "Nicholas C. Zakas" <nicholas.c.za...@gmail.com>
Date: Tue, 24 Jan 2012 18:12:27 -0800 (PST)
Local: Tues, Jan 24 2012 9:12 pm
Subject: Re: Use of <sect1> instead of <section> in DocBook
Since this thread has died off, just thought I'd post the XSLT that
works for me (the one provided earlier only copied over <section>
elements):

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform">
    <xsl:template match="section">
        <xsl:variable name="i" select="count(ancestor::node())"/>
        <xsl:element name="sect{$i}"><xsl:apply-templates/></
xsl:element>
    </xsl:template>

    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>

On Jan 7, 9:03 am, Miek Gieben <m...@miek.nl> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 37   Newer >
« Back to Discussions « Newer topic     Older topic »