[docbook-apps] RE: [docbook] better internationalization issues again
Bob Stayton [mailto:b...@sagehill.net] wrote: The encoding attribute of an xsl:output element cannot contain a variable reference (a limitation of the XSLT standard, not DocBook), so it cannot use $chunker.output.encoding. Are you sure about that? I have created a stylesheet where I use a variable for the value of the encoding attribute and it works fine (using Saxon 9). Where in the XSLT specification is that prohibited? I don't see it. Saxon 6 seems to output only UTF regardless of the encoding I specify, but with Saxon 9 I'm able to create files using any encoding. I haven't specifically tried with any other XSLT processors. * Rob Cavicchio Principal Technical Writer EMC Captiva EMC Corporation 10145 Pacific Heights Boulevard, 6th Floor San Diego, CA 92121-4234 P: (858) 320-1208 F: (858) 320-1010 E: cavicchio_...@emc.com The opinions expressed here are my personal opinions. Content published here is not read or approved in advance by EMC and does not necessarily reflect the views and opinions of EMC. - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] Re: [docbook] better internationalization issues again
Hi, The standards (1.0 and 2.0) say the value of the encoding attribute must be a string: http://www.w3.org/TR/xslt#output That should exclude the use of attribute value templates for encoding. I don't see any mention in the Saxon doc about an extension that would handle AVT. Exactly how did you use a variable that worked? Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: cavicchio_...@emc.com To: b...@sagehill.net; docbook-apps@lists.oasis-open.org; als...@gmail.com Sent: Monday, February 23, 2009 7:30 AM Subject: RE: [docbook] better internationalization issues again Bob Stayton [mailto:b...@sagehill.net] wrote: The encoding attribute of an xsl:output element cannot contain a variable reference (a limitation of the XSLT standard, not DocBook), so it cannot use $chunker.output.encoding. Are you sure about that? I have created a stylesheet where I use a variable for the value of the encoding attribute and it works fine (using Saxon 9). Where in the XSLT specification is that prohibited? I don't see it. Saxon 6 seems to output only UTF regardless of the encoding I specify, but with Saxon 9 I'm able to create files using any encoding. I haven't specifically tried with any other XSLT processors. * Rob Cavicchio Principal Technical Writer EMC Captiva EMC Corporation 10145 Pacific Heights Boulevard, 6th Floor San Diego, CA 92121-4234 P: (858) 320-1208 F: (858) 320-1010 E: cavicchio_...@emc.com The opinions expressed here are my personal opinions. Content published here is not read or approved in advance by EMC and does not necessarily reflect the views and opinions of EMC. - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] Docbook XSL, Bibliographies, and Citations
Dear All, I am a Humanities scholar with a computer programming background who is looking into alternatives to MS Word for Humanities scholars. I have already successfully used LaTeX to create my thesis but LaTeX is starting to show its age and I was wondering if Docbook might be a good replacement. I have already successfully formatted parts of my thesis in Docbook v5 and obtained a sufficiently acceptable PDF with FOP. Looking down the road, I have two problems with some serious constraints that you might be able to assist me with. First, citation styling. I have read around the mail list and on the web that the most common way to style citations and bibliography with Docbook is to use RefDB. This is the first constraint: I cannot use RefDB. On my own machine, I am running Ubuntu 8.10 amd64 and RefDB refuses to install from source (it cannot find libreadline during configure and I cannot figure out how to force it to look in /lib to find it). For other scholars, they will invariably use Windows and for the ones that I am directly in contact with, getting new software deployed would be a massive hassle and attempting to guide them through it at home would also be very difficult. So, from what I am able to discover, I would have to write (or rewrite) the bibliography XSL so that the bibliography and the bibliorefs in citation tags would be correctly done in XSL:FO for processing with FOP. Is this correct and do you have any pointers on how to do it? I am vaguely familiar with XSL from about eight years ago. The format that I must be able to use is the MHRA standard. Also, I would be willing to release the resulting XSL for others to use. The second problem, which you will probably not be able to help me much, has to do with the fact that my thesis has a critical edition of an middle Irish poem. In LaTeX, I was able to use the ednotes package to correctly format the textual notes at the bottom of the page. I am thinking that I would have to use something like TEI and then write my own XSL stylesheet to translate that into XSL:FO for processing with FOP. Does this sound reasonable? I would very much appreciate any help or thoughts that you might have. Thank you very much for your time. Sincerely, Chris Yocum - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] RE: [docbook] better internationalization issues again
Bob Stayton [mailto:b...@sagehill.net] wrote: The standards (1.0 and 2.0) say the value of the encoding attribute must be a string: http://www.w3.org/TR/xslt#output That should exclude the use of attribute value templates for encoding. I don't see any mention in the Saxon doc about an extension that would handle AVT. Exactly how did you use a variable that worked? Bob, you are right. I went and looked again at my XSL and I'm actually using not xsl:output but xsl:result-document, which of course is available only in XSLT 2.0, and according to the specification it does allow a variable for the encoding. I had *assumed* that the encoding attribute value would work the same way in all places. I had not previously understood the subtlety of attributes that accept templates vs. those that don't. I guess I just tried it and it worked so I went on. Thanks for enhancing my education. :) * Rob Cavicchio Principal Technical Writer EMC Captiva EMC Corporation 10145 Pacific Heights Boulevard, 6th Floor San Diego, CA 92121-4234 P: (858) 320-1208 F: (858) 320-1010 E: cavicchio_...@emc.com The opinions expressed here are my personal opinions. Content published here is not read or approved in advance by EMC and does not necessarily reflect the views and opinions of EMC. - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
[docbook-apps] Re: [docbook] better internationalization issues again
margin-start can be emulated with margin-$direction.align.start as this is a big change and will appear in 1.75. fair enough Thanks for the info on pre. Are you saying that the formatting of a programlisting element should always be ltr at the block level? yes, there is no popular Arabic programming language so yes, it should go from left to right unless one day I make one PL in this case I should override that manually Regarding the encoding attribute, I agree with you that UTF-8 is the right value, but we cannot just change it without warning. It could create problems when an HTTP server's configuration includes encoding information that does not agree with the HTML files. People have had to resort to various tricks to handle the quirks of older browsers. I'll be fine with just including the docbook.utf8.xsl in archive file even if it's not the default, having it there for long enough time will do the rest and yes of course, when testing I shouldn't use any external css but is there a way to tell xsl to dump all it's bultin css [used and unused] so that I can revise them but doing the dump with Arabic and English locales then do a perl script then diff and the missing parts would show up and some other tactics BTW, which rtl languages are you able to test with? Arabic of course, you should expect that we are the largest Semitic population although the media call us antisemitic this is ridiculous but it's something funny :-) Hebrew and Persian languages were included in the original patch I know that there are about a dozen of languages that uses Arabic alphabet but I can't list any of them except Urdu and Pashto but I don't know more than that [eg. I don't know locale iso codes] and I guess Urdu can also be written with a different latin-like alphabet (watch peacetv.org at the peak times for Urdu speakers I see that they write it in both scripts) Wow! it's nice to meet people like you from so far places! - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] Docbook XSL, Bibliographies, and Citations
On Mon, Feb 23, 2009 at 11:19 PM, Markus Hoenicka markus.hoeni...@mhoenicka.de wrote: Chris Yocum writes: use RefDB. This is the first constraint: I cannot use RefDB. On my own machine, I am running Ubuntu 8.10 amd64 and RefDB refuses to install from source (it cannot find libreadline during configure and I cannot figure out how to force it to look in /lib to find it). Although this is a bit off-topic here, usually this kind of error is caused by missing -dev packages. configure cannot find libreadline because all you have installed are the runtime libraries (foo.so) but not the development libraries (foo.a) which are required to build a piece of software instead of just run it. The best place to get this fixed in no time is the refdb mailing list (http://refdb.sourceforge.net/doc.html). Ah, thanks! I might try RefDB again once I get the proper dev libs installed. For other scholars, they will invariably use Windows and for the ones that I am directly in contact with, getting new software deployed would be a massive hassle and attempting to guide them through it at home would also be very difficult. RefDB is clearly a Unixish application, not an Endnote clone, so it'll take some getting used to it for the average Windows user. Windows per se is not an obstacle as Cygwin binaries are available. I've been using RefDB at work for more than 8 years on various Windows boxes. So, from what I am able to discover, I would have to write (or rewrite) the bibliography XSL so that the bibliography and the bibliorefs in citation tags would be correctly done in XSL:FO for processing with FOP. Is this correct and do you have any pointers on how to do it? I am vaguely familiar with XSL from about eight years ago. The format that I must be able to use is the MHRA standard. Also, I would be willing to release the resulting XSL for others to use. If you're not looking for a reference database with formatting capabilities, but just for the formatting part, RefDB may indeed be the wrong tool. There have been several attempts to create XSL-based bibliography styling tools. The following projects may be closer to what you have in mind: http://silmaril.ie/bibliox/biblioxdoc.html http://bibliographic.openoffice.org/citeproc/index.html Thank you very much for this. I guess what I am trying to do is reduce the number of dependencies and bits of software that I would have them learn. Unfortunately for the projects that you cite, they seem to be rather old and out of date without a larger community (which is a bit of a requirement because I would assume that my colleagues would need help when I am not available). I will give RefDB another shot and see how I get on with it. Thanks you again, Chris Yocum - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] syntax highlighting doesn't work, nor throws errors.
Mike wrote: Mauritz Jeanson wrote: | -Original Message- | From: Mike | | I'm following the instructions here to make syntax | highlighting work, | are these the wrong instructions to follow? | | http://www.sagehill.net/docbookxsl/SyntaxHighlighting.html That documentation is not completely up-to-date, unfortunately. | java -cp | /www/notlive/docbook/docbook-xsl-1.74.3-pre/extensions/saxon 65.jar:/www/notlive/docbook/saxondamnit/saxon.jar:/www/notlive/docbook/xslth ldamnit/xslthl-2.0.1.jar | \ | -Dhighlight.source=1 \ Here you pass highlight.source=1 as a Java system property, but that won't work since it is an XSLT parameter. But you also added it as parameter in chunkohp.xsl, so that's OK. | -Dxslthl.config=file:///www/notlive/docbook/xslthldamnit/hig | hlighters/xslthl-config.xml | \ | com.icl.saxon.StyleSheet ./text.xml | /www/notlive/docbook/docbook-xsl-1.74.3-pre/html/chunkohp.xsl There are some changes in DocBook-XSL 1.74.3 that haven't been properly announced and documented yet. This is what's needed to use the syntax higlighting extension: 1. Use a processor that works with the extension: Saxon 6 or Xalan-J. 2. Add the latest version of xslthl-2.X.X.jar to your classpath. 3. Set the highlight.source parameter to 1. 4. Import two stylesheet modules, highlighting/common.xsl and either html/highlight.xsl (for HTML output) or fo/highlight.xsl (for FO output), into your customization layer. So you need to fix item 4. Thank you, it's still not working but I feel like I'm closer. Here's what's wrong now. I still get the same output (no highlighting), but during the transform it says: XSLT Highlighter: Cannot read xslthl-config.xml, no custom highlighters will be available. If I copy and paste the path I gave it into firefox (linux), firefox finds the file fine and displays it. That path is CORRECT! -Dxslthl.config=file:///www/notlive/docbook/xslthldamnit/highlighters/xslthl-config.xml I also tried giving it the path to the xslthl-config.xml file that comes with the docbook xsl: -Dxslthl.config=file:///www/notlive/docbook/docbook-xsl-1.74.3-pre/highlighting/xslthl-config.xml \ Which is also a valid path, and I can also cut and paste into firefox (including the file:// part) and see the file. Still get the error message and no highlighting. (Bump.) Has *anyone* been able to successfully get syntax highlighting to work in linux with the latest DocBook, Saxon 6.5.5, and xslthl-2.0.1? I want to know if this is even possible or a fatal bug... - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] syntax highlighting doesn't work, nor throws errors.
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Mike wrote: (Bump.) Has *anyone* been able to successfully get syntax highlighting to work in linux with the latest DocBook, Saxon 6.5.5, and xslthl-2.0.1? I want to know if this is even possible or a fatal bug... Yes, I have gotten it to work for Java code in one of my articles. I could send you a version of my build scripts (using ANT) with an example, if that helps. With kind regards, Juri Memmert - -- The test of a first-rate intelligence is the ability to hold two opposed ideas in the mind at the same time and still retain the ability to function. -- F. Scott Fitzgerald -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREDAAYFAkmjiZoACgkQeKE9NrxdrXzXzgCfcEe5qf7EID7PVQNHFAhbPlKo JBAAoIxR72nIEwSBWGWirzxH2VUjLztb =8E55 -END PGP SIGNATURE- - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org