Mailing List Archive

Upcoming DTD update for easy printable documents
Hi all

Xavier has put up a nice fix for our XSL/DTD files that allow our users to
quickly find the printable document of the page they are viewing. Interested
readers should point their webbrowser to
http://bugs.gentoo.org/show_bug.cgi?id=64052

The DTD will now require (instead of allow) the use of the link attribute
inside the <guide> and <book> tags, so

<guide link="name-of-the-document.xml">

is now mandatory. Xavier has nicely added "backwards compatibility" so that
documents who don't contain this link attribute still function. The problem
we face is that some documents do contain a link attribute, but with a wrong
value. This may lead to incorrect printable documents or even internal
server errors.

Can the languages please check their documents if they contain a (correct) link
attribute:

$ grep '<guide>' *.xml -> Shows the documents that don't have one
$ grep '<guide link=' *.xml -> Shows the documents that have one with
their link setting

Also, you all know I'm impatient so I'm eager to commit Xavier's patches!
I'll first go check the documents that aren't in doc/ and fix those
(including GWN).

Wkr,
Sven Vermeulen

--
^__^ And Larry saw that it was Good.
(oo) Sven Vermeulen
(__) http://www.gentoo.org Documentation & PR
Re: Upcoming DTD update for easy printable documents [ In reply to ]
Sven Vermeulen wrote:
> Hi all
>
> Xavier has put up a nice fix for our XSL/DTD files that allow our users to
> quickly find the printable document of the page they are viewing. Interested
> readers should point their webbrowser to
> http://bugs.gentoo.org/show_bug.cgi?id=64052
>
> The DTD will now require (instead of allow) the use of the link attribute
> inside the <guide> and <book> tags, so
>
> <guide link="name-of-the-document.xml">
>
> is now mandatory. Xavier has nicely added "backwards compatibility" so that
> documents who don't contain this link attribute still function. The problem
> we face is that some documents do contain a link attribute, but with a wrong
> value. This may lead to incorrect printable documents or even internal
> server errors.
>
> Can the languages please check their documents if they contain a (correct) link
> attribute:
>
> $ grep '<guide>' *.xml -> Shows the documents that don't have one
> $ grep '<guide link=' *.xml -> Shows the documents that have one with
> their link setting
>
> Also, you all know I'm impatient so I'm eager to commit Xavier's patches!
> I'll first go check the documents that aren't in doc/ and fix those
> (including GWN).
>
> Wkr,
> Sven Vermeulen
>

Running the following one-liner reveals 189 <guide> documents with a wrong
link attribute, or no link attribute for a few of them.

./htdocs $ find . -iname '*xml' -exec grep -H '^.*<guide' {} \;|grep -v
gwn|ruby -n -e 'f=$_.split(":")[0][1..-1];l="";if $_=~/link ?=
?"([\.\/a-zA-Z0-9_-]*)"/ then l=$1 end;if (l =~ /\// and f != l) or (l !~ /\//
and f.split("/")[-1] != l) then puts $_ end;'

The current list is at http://dev.gentoo.org/~neysx/badlinks.txt

Looks like I should keep this one and run it regularly.


HTH,
--
/ Xavier Neys
\_ Gentoo Documentation Project
/ French & Internationalisation Lead
\ http://www.gentoo.org/doc/en
/\