|
From: Ray L. <ra...@es...> - 2002-11-25 20:14:31
|
Hi, Just wondering if anybody has begun working on an DocUtils-Xml -> Xsl to multi-target ( Html w/Css | Html no CSS | PDF ) transformation project yet. I've spent the last few months working on just such a thing, but my initial documents are my own grammar of Xml, and well ... after much working with it I've definitely come to the decision that while great for transformation, and computerized transformations it sucks to have to write so many < blah blah > just to get a basic webpage up. In comes DocUtils, and it's ability to create an Xml representation of reST. So I started reading the code on Sunday afternoon ( yesterday ), and have decided I *really* want to start using reST, as my standard static content creation language. Non-static stuff, might move to generate reST, but I've already built it to generate my Xml grammar so I really don't see the need at this time. Maybe if somebody creates a better presentation layer than mine I'll move it, but for now I think mines better than most out there. So the question is, has anybody started to work on any Xsl for DocUtils-XML? If they have can they share what they've worked on? I've looked in the sandbox but have found nothing ... maybe I'm looking in the wrong place? Anyways thanks for your time. Ray PS : Sorry for the cross post, but I thought it would be easier if I sent this out as widely as possible, and I *know* that sometimes people in dev are not in users, and vice-versa. |
|
From: David G. <go...@py...> - 2002-11-26 01:00:39
|
Ray Leyva wrote: > Just wondering if anybody has begun working on an DocUtils-Xml -> Xsl to > multi-target ( Html w/Css | Html no CSS | PDF ) transformation project > yet. Not as such, no. > So the question is, has anybody started to work on any Xsl for > DocUtils-XML? If they have can they share what they've worked on? I've > looked in the sandbox but have found nothing ... maybe I'm looking in > the wrong place? Back in April I merged the former reStructuredText and DPS projects into Docutils, and some of the old sandbox projects got left behind. Several XSL examples were there: * http://cvs.sf.net/cgi-bin/viewcvs.cgi/structuredtext/sandbox/alanj (Alan Jaffray) * http://cvs.sf.net/cgi-bin/viewcvs.cgi/structuredtext/sandbox/paulw (Paul Wright) * http://cvs.sf.net/cgi-bin/viewcvs.cgi/structuredtext/sandbox/rtxt2html (Remi Bertholet) They haven't been updated for some time, but they may help you get started. If you can, please contribute your results back to Docutils! -- David Goodger <go...@py...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |
|
From: Ray L. <ra...@es...> - 2002-11-26 15:39:54
|
I'd be more than happy to contribute. Right now though it requires libxml2, libxslt and their respective python bindings for this to work. I don't know if you're interested in something like that. Actually I can contribute the xsl stylesheets I'll be generating right from the start. A few questions: 1) The docutils-xml.py has some none functioning commandline options, is that known? I can document if it hasn't already. 2) Can there be a command line option to remove the <!DOCTYPE ... directive from the XML file created by docutils xml? I know it's a minidom, but I don't understand the cmdline classes well enought to add this option yet. The reason I want to remove it is for offline processing with libxml2 ... it's a validating parser, and when I go to transform the docutils-xml file it first tries to validate. That's no issue when connected, but when offline it can get a bit annoying. 3) Is there a single test document that uses everything in rst ( section indentation, tables, etc ... )? Thanks for your feedback, and I'll definitely be contributing the Xsl stylesheets. I've got one that works throught he sections / title / paragraphs. I'm trying to work out the rest as I go along. That's why a good sample that uses *everything* would be great. Ray |
|
From: David G. <go...@py...> - 2002-11-27 00:44:37
|
Ray Leyva wrote: > I'd be more than happy to contribute. Right now though it requires > libxml2, libxslt and their respective python bindings for this to work. > I don't know if you're interested in something like that. Not in the core, no, but a sandbox or parallel project would be great. > 1) The docutils-xml.py has some none functioning commandline options, > is that known? I can document if it hasn't already. No, it isn't known. Please do tell. > 2) Can there be a command line option to remove the <!DOCTYPE ... > directive from the XML file created by docutils xml? Yes. I've made the changes, but I'll check them in tomorrow night (can't now). > I know it's a minidom, but I don't understand the cmdline classes well > enought to add this option yet. I don't understand this. > 3) Is there a single test document that uses everything in rst ( > section indentation, tables, etc ... )? tools/test.txt exists for that purpose (not 100%, but close). -- David Goodger <go...@py...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |
|
From: <eng...@ss...> - 2002-11-27 07:01:43
|
On 26 Nov 2002, Ray Leyva wrote: > 3) Is there a single test document that uses everything in rst ( > section indentation, tables, etc ... )? i'd say tools/test.txt -- BINGO: Think outside the box --- Engelbert Gruber -------+ SSG Fintl,Gruber,Lassnig / A6410 Telfs Untermarkt 9 / Tel. ++43-5262-64727 ----+ |
|
From: Ray L. <mai...@es...> - 2002-11-27 07:14:32
|
Working by running html.py on tools/test.txt, and checking the results (
visually / manually ) versus what I get when I transform tools/test.txt
with docutils-xml.py, and apply xsl stylesheet to the resulting test.xml
documnt. In some cases there are disparaties, what is the best way to
determing what it *should* be?
For instance in the examples below I believe my interpretation to be
more correct, but I may be wrong please let me know.
Specifically on the enumerated lists samples :
test.html from running html.py on tools/test.txt :
2.3 Enumerated Lists
1.
Arabic numerals.
1. lower alpha)
1. (lower roman)
1. upper alpha.
1. upper roman)
2.
Lists that don't start at 1:
3. Three
4. Four
3. C
4. D
3. iii
4. iv
test.txt -> docutils-xml.py = test.xml -> my xsl stylesheet:
2.3 Enumerated Lists
1. Arabic numerals.
a. lower alpha)
i. (lower roman)
A. upper alpha.
I. upper roman)
2. Lists that don't start at 1:
Enumerated list start value not ordinal-1: "3" (ordinal 3)
3. Three
4. Four
Enumerated list start value not ordinal-1: "C" (ordinal 3)
C. C
D. D
Enumerated list start value not ordinal-1: "iii" (ordinal 3)
iii. iii
iv. iv
Which is a better representation?
Thanks,
Ray
PS: I've inundated David Goodger with multiple replies that I was
sending directly to him, when I thought that I was sending to the list.
Mea culpa. I'll be more careful in the future.
On Tue, 2002-11-26 at 22:50, eng...@ss... wrote:
> On 26 Nov 2002, Ray Leyva wrote:
>
> > 3) Is there a single test document that uses everything in rst (
> > section indentation, tables, etc ... )?
>
> i'd say tools/test.txt
>
>
> --
> BINGO: Think outside the box
> --- Engelbert Gruber -------+
> SSG Fintl,Gruber,Lassnig /
> A6410 Telfs Untermarkt 9 /
> Tel. ++43-5262-64727 ----+
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Get the new Palm Tungsten T
> handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> _______________________________________________
> Docutils-develop mailing list
> Doc...@li...
> https://lists.sourceforge.net/lists/listinfo/docutils-develop
|
|
From: David G. <go...@py...> - 2002-11-28 03:56:47
|
Ray Leyva wrote: > Working by running html.py on tools/test.txt, and checking the > results ( visually / manually ) How is the HTML being rendered? > versus what I get when I transform tools/test.txt with > docutils-xml.py, and apply xsl stylesheet to the resulting test.xml > documnt. In some cases there are disparaties, what is the best way > to determing what it *should* be? The internal document tree is described in spec/doctree.txt (http://docutils.sf.net/spec/doctree.html); it specifies how attributes should be interpreted and processing expectations. The output should match the input as much as possible. I haven't written anything to specify what the output should be. The HTML output assumes a modern graphical browser (Mozilla, MSIE, etc.) that understands and correctly processes cascading stylesheets (at least level 1, preferably level 2 also). Support for stylesheets is improving, but there are differences between browsers. I check the rendering on Mozilla and MSIE specifically. > For instance in the examples below I believe my interpretation to be > more correct, but I may be wrong please let me know. > > Specifically on the enumerated lists samples : It took me a while to see what the difference was. Please point out the differences explicitly. I believe you mean that in the HTML, the enumerators of list items are always arabic numerals, where some ought to be letters or roman numerals instead. I've seen this before from people using older browsers, especially text-based browsers (links/lynx?). The rendering of enumerators is completely governed by the stylesheet, so either the browser can't find the stylesheet (try using "--embed-stylesheet"), or it can't understand it (try a recent Mozilla or MSIE). If HTML that doesn't rely on stylesheets is desired, a new Writer component is needed. As I've said before, the writers/html4css1.py module I wrote is a proof of concept, reference implementation, but it doesn't have to be the only game in town. I've updated the FAQ with some of these issues: <http://docutils.sf.net/FAQ.html>. -- David Goodger <go...@py...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |
|
From: David G. <go...@py...> - 2002-11-28 03:55:07
|
Ray Leyva wrote: > 2) Can there be a command line option to remove the <!DOCTYPE ... > directive from the XML file created by docutils xml? I've added "--no-doctype" and "--no-xml-declaration" options to the docutils_xml.py writer. Use the tools/docutils-xml.py front end. -- David Goodger <go...@py...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |
|
From: Aahz <aa...@py...> - 2002-11-26 15:50:02
|
[removing docutil-users] On Tue, Nov 26, 2002, Ray Leyva wrote: > > 3) Is there a single test document that uses everything in rst ( > section indentation, tables, etc ... )? I believe spec/rst/reStructuredText.txt comes pretty close. -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "If you don't know what your program is supposed to do, you'd better not start writing it." --Dijkstra |
|
From: Ray L. <ra...@es...> - 2002-11-26 15:57:37
|
Thank you. Ray On Tue, 2002-11-26 at 07:49, Aahz wrote: > [removing docutil-users] > > On Tue, Nov 26, 2002, Ray Leyva wrote: > > > > 3) Is there a single test document that uses everything in rst ( > > section indentation, tables, etc ... )? > > I believe spec/rst/reStructuredText.txt comes pretty close. > -- > Aahz (aa...@py...) <*> http://www.pythoncraft.com/ > > "If you don't know what your program is supposed to do, you'd better not > start writing it." --Dijkstra > > > ------------------------------------------------------- > This SF.net email is sponsored by: Get the new Palm Tungsten T > handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > _______________________________________________ > Docutils-develop mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-develop |