Using Mallard for Ubuntu docs

Phil Bull philbull at gmail.com
Mon Jul 5 15:55:44 UTC 2010


Hi guys,

On Sun, 2010-07-04 at 19:39 -0400, Shaun McCance wrote:
> You want a tool called xmlstarlet. I don't know if it's packaged
> in Ubuntu or not. The query you described is this:
> 
> xmllint --noent --xinclude /path/to/docbook.xml | \
>   xmlstarlet sel -t -v 'count(//para[count(*)!=0])' -
> 
> There are other block elements to check. Probably screen,
> programlisting, td, and entry are a good start.

Thanks Shaun! xmlstarlet is packaged for Ubuntu. I resisted the urge to
play with this for the rest of the day (seriously, I want to histogram
everything) and have attached the results of a few queries for our docs.
We have comparatively few <screen> and <td> elements, so it's mostly the
<para>s we need to look at. I don't think that writing a script to deal
with translations would be too big a job.

Thanks,

Phil

-- 
Phil Bull
https://launchpad.net/~philbull
-------------- next part --------------

---------------------------------------
No. of <para> with or without children
---------------------------------------
TOPIC, # WITH CHILDREN, # WITHOUT CHILDREN
about-ubuntu, 20, 28
config-desktop, 21, 11
keeping-safe, 45, 38
add-applications, 52, 34
switching, 337, 206
administrative, 11, 9
desktop-effects, 30, 18
advanced-topics, 7, 3
files-and-docs, 5, 7
musicvideophotos, 152, 52
usb-creator, 21, 26
basic-commands, 70, 17
games, 78, 9
newtoubuntu, 41, 16
windows, 194, 92
hardware, 81, 63
office, 55, 16
printing, 34, 28
internet, 293, 83

-------------------------------
<para> containing <menuchoice>
-------------------------------
about-ubuntu 2
config-desktop 2
keeping-safe 10
add-applications 9
switching 60
administrative 3
desktop-effects 3
advanced-topics 0
files-and-docs 0
musicvideophotos 32
usb-creator 1
basic-commands 2
games 10
newtoubuntu 9
windows 48
hardware 17
office 11
printing 9
internet 49

-----------------------------
<para> containing <emphasis>
-----------------------------
about-ubuntu 3
config-desktop 0
keeping-safe 3
add-applications 16
switching 83
administrative 0
desktop-effects 0
advanced-topics 0
files-and-docs 3
musicvideophotos 18
usb-creator 0
basic-commands 15
games 27
newtoubuntu 6
windows 25
hardware 23
office 15
printing 4
internet 18



More information about the ubuntu-doc mailing list