Subject: Re: More problems and questions From: "Christopher R. Maden" <crism@xxxxxxxxxx> Date: Sat, 09 Sep 2000 01:23:48 -0700 |
1. Given that there exist FO renderer(s) written in Java, such as FOP, and given that some XSLT processors, such as Saxon, allow calling extension functions written in Java, is it possible to access FO renderer from within XSLT through this mechanism, with the goal of being able to ask the renderer some questions and give it some tests and then modify the transformation algorithm based on the results returned? An important point here is that the renderer being accessed from within XSLT is the same as the one that will produce the final output, therefore the results of calling the FO renderer functions are guaranteed to be true to the final result. More specifically,
- is this method workable in principle?
- if yes, is it possible to implement it right now, with current versions of specs and software?
3. In my custom TeX macro packages (they're intended for typesetting mostly text with little code or math), I use \catcodes to enable "smart" character macros. For instance, a hyphen in the input expands into ~---, simple " quotes expand into alternating open and closing typographic quotes, _something_ expands into {\it something}. This saves a lot of typing, makes source text more readable and editable, and moves the presentation aspect where it belongs, i.e. in the stylesheet. Naturally, I would like to keep using these simple abbreviations in XML/XSL too. As there are no "character macros" in XSL, obviously what I need is some kind of an input filter that will replace all hyphens in the text (not element names or attributes) by &emdash;, _something_ by <em>something</em> etc. Indeed, Saxon documentation says I can write such a filter in Java. The problem, as with the previous question, is that I'm not a Java programmer. What I probably would be able to do is to take someone else's example of a simple search-and-replace filter and adopt it to my needs. Therefore the question: Where can I find such a working example, for Saxon or any other processor? Is there perhaps an easier method to achieve this than coding in Java?
-Chris -- Christopher R. Maden, Senior XML Analyst, Lexica LLC 222 Kearny St., Ste. 202, San Francisco, CA 94108-4510 +1.415.901.3631 tel./+1.415.477.3619 fax <URL:http://www.lexica.net/> <URL:http://www.oreilly.com/%7Ecrism/>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
More problems and questions, anilia bruho | Thread | RE: More problems and questions, Kay Michael |
More problems and questions, anilia bruho | Date | RE: Using XHTML generated with W3C, Chris Bayes |
Month |