Hello, on Montag, 12. März 2007, Thomas Schraitle wrote:
On Sonntag, 11. März 2007, Christian Boltz wrote:
[...]
I usually get headache. OK, it wasn't a big problem with this small file, but I had "some" bad experience with the XLS files for the german SUSE Linux FAQ...
From my work with XSLT, you get headache when [...]
My list was not meant as criticism of your files, it was more a *general* rant. ;)
I understood it as such - and I checked my files against it ;-)
I don't say, XML/XSLT is the solution for everything. However, I saw many XML files and XSLT stylesheet broken by design but the author vociferous complains about the deficiancies of XML/XSLT instead of reconsidering his/her style. :) (Again, it's not a criticism of your files.)
np ;-)
[...]
* you don't use the full potential of XSLT. For example using xsl:for-each instead of xsl:apply-templates where it is in most cases more appropriate.
Hmmm...
cb@cboltz:~/suse-linux-faq/dtd/html> grep for-each * |wc -l 73 cb@cboltz:~/suse-linux-faq/dtd/html> grep apply-templates * |wc -l 13
In most cases xsl:for-each is considered bad style. :) XSLT is *not* Perl, Python, Ruby, ...
... and, in my case, especially not PHP *g*
Here are some articles that I think are worth reading:
* How Not to Use XSLT
Reminds me of http://www.kasper-online.de/goldmail/ and http://www.karzauninkat.com/Goldhtml/goldhtml.htm *g* (both german)
[...]
Thanks for the links - I'll have a look at them when I find some free time.
Another headache candidate:
* you need a table of content / menu _and_ (part of the) content in the same output file (this explains why the LaTeX output was easier - it does the TOC automatically)
Hmn, I am not sure, if I understand your problem completely.
Have a look at http://suse-linux-faq.koehntopp.de (or any subpage). Basically, we need the content of the XML file twice to generate one HTML file: - first for the menu (left column) - second for the content So the workflow is: - parse the XML to generate the menu - "rewind" the XML file - parse the XML again to generate the content (content = table of contents | chapter | question with answer) This caused some[tm] headache and makes the HTML generation ways more difficult than the LaTeX generation (because LaTeX generates the "Menu" automatically). Additionally: As already said, we aren't the original author of the XSLT files - and you might know that understanding other people's code can be difficult ;-) And to make it even more funny, we have switches to generate an all-questions-in-one-HTML-file version and another one with links visible that is later lynx -dump'ed to text/plain. In short: It works, and I'm very happy about that - because it means I don't have to touch it ;-)) Regards, Christian Boltz -- [nach Update auf SuSE 9.3] Jetzt habe ich nur ein neues Problem: Es ist doch echt stinklangweilig, wenn's nix mehr zu frickeln gibt...;-) [Friedemann Garvelmann in suse-laptop] --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-doc+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-doc+help@opensuse.org