Opened 21 years ago
Closed 21 years ago
#807 closed defect (fixed)
Clean up the HTML rendering of the book and make its tags more semantic with an XSL script.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | lowest | Milestone: | |
Component: | Book | Version: | CVS |
Severity: | normal | Keywords: | |
Cc: | Matthew Burgess |
Description
Thread starts here: http://linuxfromscratch.org/pipermail/lfs-dev/2004-April/044465.html Reply from M.Canales: http://linuxfromscratch.org/pipermail/lfs-dev/2004-April/044477.html
Example of how an XHTML document should ideally look like: http://linuxfromscratch.org/pipermail/lfs-dev/2004-April/044482.html
Attachments (1)
Change History (12)
by , 21 years ago
Attachment: | binutils-pass2-new.html added |
---|
comment:1 by , 21 years ago
Cc: | added |
---|---|
Status: | new → assigned |
About the output for <screen> tags. The output propposed by Jeroen for the commands screens is like this: <div class="screen"> <code class="userinput">../binutils-2.14/configure --prefix=/tools \<br />
--enable-shared --with-lib-path=/tools/lib</code>
</div> The problem is that I can't insert the <br/> into a characters stream. I don't know if this is possible at all. Also, <code> is for programs code, semanticaly we should use <kbd> for text that the user would type. The alternative is this other output: <pre class="screen"> <kbd class="command">mkdir /tools/include/asm cp include/asm/* /tools/include/asm cp -R include/asm-generic /tools/include</kbd> </pre> For the build time & space screens, the propossed output by Jeroen was: <p class="screen"> Approximate build time: 1.5 SBU<br /> Required disk space: 108 MB </p> Appart the <br/> issue mentioned above, to can do different outputs for differents types of <screens> we need modify the XML sources, adding a "class" attribute to the <screen> tag, or/and changing the tagging in the appropiated places to <literallayout>.
comment:2 by , 21 years ago
I hate "pre", because it doesn't say anything about the text contained within it. However, in combination with <kbd> it seems like the best solution.
comment:3 by , 21 years ago
Well, what do you think about this?
<p class="sbu">
<tt>Approximate build time:  0.2 SBU<br /> Required disk space:     5.2 MB</tt>
</p>
I can insert the <br/> tag here because there are fixed strings that can be used to match and break the text stream. To keep the extra spaces we need modify this entities (this can be done now, not affect to the current output): <!ENTITY buildtime "Approximate build time: "> <!ENTITY diskspace "Required disk space: "> More work in progress...
comment:4 by , 21 years ago
Not sure what you are saying here.
Using &#number; is never good html. What does   mean?
The correct method is to use a standard entity as defined in the standards: http://www.htmlhelp.com/reference/html40/entities/latin1.html
In this case, the use of as in your second example is better.
However the best way is to use <span> tags and and set the left padding. Its best to avoid presentational issues in the html completely.
comment:5 by , 21 years ago
I echo what Bruce says about presentational HTML.
<p class="sbu"> <tt>Approximate build time:  0.2 SBU<br /> Required disk space:     5.2 MB</tt>
</p>
We can also argue that it's a parent/child relation (or term /definitionterm in a broad sense). Is this possible:
<dl class="sbu"> <dt>Approximate build time:</dt>
<dd>0.2 SBU</dd>
<dt>Required disk space:</dt>
<dd>5.2 MB</dd>
</dl>
To achieve your presentation, something like the following CSS would be needed:
dl.sbu dt { float: right; widhth: 15em; } dl.sbu dd { clear: left; }
Would this also be easier for you to code?
comment:6 by , 21 years ago
Oppening a new thread in lfs-dev to make a proper discussion about the goals and related issues.
comment:7 by , 21 years ago
The version 0.9pre1 of the lfs-chunked.xsl stylesheets is ready for review. On-line render of newxml: http://www.lfs-es.org/newxml/lfs-book HTML tarball: http://www.lfs-es.org/newxml/lfs-book-macana-20040429.html.tar.bz2 No changes in the XML code. All the files are valid XHTML 1.0 Strict Fixed almost all the issues reported by Jeroen and more, except the ones that depend upon changes in the XML code for make it semanticaly correct DocBook-XML. See it and enjoy ;-)
comment:8 by , 21 years ago
I suggest a css addition:
div.sect1 pre.screen {
background-color: #cff; /* light blue */
}
This makes the build time/disk space section different from the actual build instructions.
comment:9 by , 21 years ago
I agree about make a diffrence in their look, but the build-time/disk-space block has a bad XML tagging. We must fix their code before think in their presentation.
comment:10 by , 21 years ago
Btw, if you already are putting colors in the css (like the commands), then also do it for the background. Choose between overwriting nothing of the user's settings, or all of his settings.
comment:11 by , 21 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in LFS XSL StyleSheets version 0.9, see bug#814 The remainig issues depend upon changes in the XML sources. This will go in another bug after 5.1 release.
Example XHTML