Author: chatellier Date: 2008-08-27 12:57:01 +0000 (Wed, 27 Aug 2008) New Revision: 185 Added: trunk/jrst2/LICENSE.txt trunk/jrst2/THIRD-PARTY.txt trunk/jrst2/src/main/ trunk/jrst2/src/main/java/ trunk/jrst2/src/main/resources/ trunk/jrst2/src/test/java/ trunk/jrst2/src/test/java/org/ trunk/jrst2/src/test/resources/ trunk/jrst2/src/test/resources/comparePython.xml trunk/jrst2/src/test/resources/definition.rst trunk/jrst2/src/test/resources/footnoteTest.rst trunk/jrst2/src/test/resources/footnoteTest2.rst trunk/jrst2/src/test/resources/frEntier.rst trunk/jrst2/src/test/resources/test.rst trunk/jrst2/src/test/resources/test2.rst trunk/jrst2/src/test/resources/test3.rst trunk/jrst2/src/test/resources/test4.rst trunk/jrst2/src/test/resources/text.rst trunk/jrst2/src/test/resources/textEntier.rst trunk/jrst2/src/test/resources/textHeader.rst trunk/jrst2/src/test/resources/textLiteral.txt Removed: trunk/jrst2/LICENSE.txt trunk/jrst2/src/java/ trunk/jrst2/src/main/java/language-en_US.properties trunk/jrst2/src/main/java/language-fr_FR.properties trunk/jrst2/src/main/resources/log4j.properties trunk/jrst2/src/resources/ trunk/jrst2/src/test/java/org/codelutin/jrst/comparePython.xml trunk/jrst2/src/test/java/org/codelutin/jrst/definition.rst trunk/jrst2/src/test/java/org/codelutin/jrst/footnoteTest.rst trunk/jrst2/src/test/java/org/codelutin/jrst/footnoteTest2.rst trunk/jrst2/src/test/java/org/codelutin/jrst/frEntier.rst trunk/jrst2/src/test/java/org/codelutin/jrst/sdoc-0.5.0-beta.jar trunk/jrst2/src/test/java/org/codelutin/jrst/test.rst trunk/jrst2/src/test/java/org/codelutin/jrst/test2.rst trunk/jrst2/src/test/java/org/codelutin/jrst/test3.rst trunk/jrst2/src/test/java/org/codelutin/jrst/test4.rst trunk/jrst2/src/test/java/org/codelutin/jrst/text.rst trunk/jrst2/src/test/java/org/codelutin/jrst/textEntier.rst trunk/jrst2/src/test/java/org/codelutin/jrst/textHeader.rst trunk/jrst2/src/test/java/org/codelutin/jrst/textLiteral.txt trunk/jrst2/src/test/java/org/codelutin/jrst/xmlunit-1.1beta1.jar trunk/jrst2/src/test/org/ Modified: trunk/jrst2/changelog trunk/jrst2/pom.xml trunk/jrst2/src/main/java/org/codelutin/jrst/AdvancedReader.java trunk/jrst2/src/main/java/org/codelutin/jrst/DocumentHandler.java trunk/jrst2/src/main/java/org/codelutin/jrst/DocumentWalker.java trunk/jrst2/src/main/java/org/codelutin/jrst/JRST.java trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTDirective.java trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTGenerator.java trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTInterface.java trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTLexer.java trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTReader.java trunk/jrst2/src/main/java/org/codelutin/jrst/ReStructuredText.java trunk/jrst2/src/main/java/org/codelutin/jrst/directive/ContentDirective.java trunk/jrst2/src/main/java/org/codelutin/jrst/directive/DateDirective.java trunk/jrst2/src/main/java/org/codelutin/jrst/directive/ImageDirective.java trunk/jrst2/src/main/java/org/codelutin/jrst/directive/SectnumDirective.java trunk/jrst2/src/test/java/org/codelutin/jrst/AdvancedReaderTest.java trunk/jrst2/src/test/java/org/codelutin/jrst/Compare.java trunk/jrst2/src/test/java/org/codelutin/jrst/GutterColor.java trunk/jrst2/src/test/java/org/codelutin/jrst/JRSTGeneratorTest.java trunk/jrst2/src/test/java/org/codelutin/jrst/JRSTReaderTest.java trunk/jrst2/src/test/java/org/codelutin/jrst/ThreadRedirection.java trunk/jrst2/src/test/java/org/codelutin/jrst/XMLCaseTest.java Log: * Switch license to lgpl * maven 2 layout Deleted: trunk/jrst2/LICENSE.txt =================================================================== --- trunk/jrst2/LICENSE.txt 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/LICENSE.txt 2008-08-27 12:57:01 UTC (rev 185) @@ -1,280 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS Added: trunk/jrst2/LICENSE.txt =================================================================== --- trunk/jrst2/LICENSE.txt (rev 0) +++ trunk/jrst2/LICENSE.txt 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,166 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + Added: trunk/jrst2/THIRD-PARTY.txt =================================================================== --- trunk/jrst2/THIRD-PARTY.txt (rev 0) +++ trunk/jrst2/THIRD-PARTY.txt 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,51 @@ +List of third-party dependencies grouped by their license type. + +BSD License : + * XMLUnit for Java (xmlunit:xmlunit:1.2 - http://xmlunit.sourceforge.net/) + +Common Public License Version 1.0 : + * JUnit (junit:junit:3.8.2 - http://junit.org) + +LGPL : + * Lutin utilities library (org.codelutin:lutinutil:0.30-SNAPSHOT - http://labs.libre-entreprise.org/projects/lutinutil) + +MIT-like License : + * DocBook XSL Stylesheets (org.docbook:docbook-xsl:1.72.0 - http://docbook.sourceforge.net) + +The Apache Software License, Version 2.0 : + * Apache FOP (org.apache.xmlgraphics:fop:0.95beta-1 - http://xmlgraphics.apache.org/fop/) + * Apache XML Graphics Commons (org.apache.xmlgraphics:xmlgraphics-commons:1.3 - http://xmlgraphics.apache.org/commons/) + * Avalon Framework API (org.apache.avalon.framework:avalon-framework-api:4.3.1 - http://www.apache.org/excalibur/avalon-framework/avalon-framework-api) + * Batik AWT utilities (org.apache.xmlgraphics:batik-awt-util:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik CSS engine (org.apache.xmlgraphics:batik-css:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik DOM implementation (org.apache.xmlgraphics:batik-dom:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik GVT (Graphics Vector Tree) (org.apache.xmlgraphics:batik-gvt:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik Java2D SVG generator (org.apache.xmlgraphics:batik-svggen:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik SVG DOM implementation (org.apache.xmlgraphics:batik-svg-dom:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik SVG microsyntax parser library (org.apache.xmlgraphics:batik-parser:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik SVG transcoder classes (org.apache.xmlgraphics:batik-transcoder:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik XML utility library (org.apache.xmlgraphics:batik-xml:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik animation engine (org.apache.xmlgraphics:batik-anim:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik bridge classes (org.apache.xmlgraphics:batik-bridge:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik extension classes (org.apache.xmlgraphics:batik-extension:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik external code (org.apache.xmlgraphics:batik-ext:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik scripting language classes (org.apache.xmlgraphics:batik-script:1.7 - http://xmlgraphics.apache.org/batik/) + * Batik utility library (org.apache.xmlgraphics:batik-util:1.7 - http://xmlgraphics.apache.org/batik/) + * Commons Collections (commons-collections:commons-collections:3.2.1 - http://commons.apache.org/collections/) + * Commons Lang (commons-lang:commons-lang:2.4 - http://commons.apache.org/lang/) + * Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging) + * IO (commons-io:commons-io:1.3.1 - http://jakarta.apache.org/commons/io/) + * Log4j (log4j:log4j:1.2.14 - http://logging.apache.org/log4j/docs/) + * Logging (commons-logging:commons-logging:1.0.4 - http://jakarta.apache.org/commons/logging/) + * XML Commons External Components XML APIs (xml-apis:xml-apis:1.0.b2 - http://xml.apache.org/commons/#external) + * XML Commons External Components XML APIs (xml-apis:xml-apis:1.3.04 - http://xml.apache.org/commons/components/external/) + * XML Commons External Components XML APIs Extensions (xml-apis:xml-apis-ext:1.3.04 - http://xml.apache.org/commons/components/external/) + +Unknown license : + * Logging (commons-logging:commons-logging:1.0.3 - http://jakarta.apache.org/commons/logging/) + * Unnamed - commons-beanutils:commons-beanutils:jar:1.7.0 (commons-beanutils:commons-beanutils:1.7.0 - no url defined) + * Unnamed - commons-primitives:commons-primitives:jar:1.0 (commons-primitives:commons-primitives:1.0 - no url defined) + * Unnamed - sdoc:sdoc:jar:0.5.0-beta (sdoc:sdoc:0.5.0-beta - no url defined) + * Unnamed - uk.co.flamingpenguin:jewelcli:jar:0.53 (uk.co.flamingpenguin:jewelcli:0.53 - no url defined) + * Unnamed - xalan:xalan:jar:2.6.0 (xalan:xalan:2.6.0 - no url defined) + * dom4j (dom4j:dom4j:1.6.1 - http://dom4j.org) \ No newline at end of file Modified: trunk/jrst2/changelog =================================================================== --- trunk/jrst2/changelog 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/changelog 2008-08-27 12:57:01 UTC (rev 185) @@ -1,3 +1,8 @@ +ver-0.8 xxx xxx + + * Switch license to lgpl + * maven 2 layout + ver-0.7 poussin 20061110 * complete rewrite where dom4j tree is use as memory model Modified: trunk/jrst2/pom.xml =================================================================== --- trunk/jrst2/pom.xml 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/pom.xml 2008-08-27 12:57:01 UTC (rev 185) @@ -5,11 +5,11 @@ <!--The version of maven's project object model--> <modelVersion>4.0.0</modelVersion> - <!--lutinproject.xml--> + <!-- parent --> <parent> - <groupId>lutinlib</groupId> + <groupId>org.codelutin</groupId> <artifactId>lutinproject</artifactId> - <version>2.2</version> + <version>2.4</version> </parent> <!--A unique name for this project--> @@ -26,29 +26,17 @@ <description>Parser RST en Java.</description> <inceptionYear>2004</inceptionYear> - <!--Tracking--> - <issueManagement> - <url>http://labs.libre-entreprise.org/tracker/?group_id=54</url> - </issueManagement> <properties> - <!--Source base dir--> - <maven.src.dir>${basedir}/src</maven.src.dir> + <!-- id du projet du labs --> + <labs.id>54</labs.id> - <!--Compile with ?--> - <maven.compile.source>1.5</maven.compile.source> - <maven.compile.target>1.5</maven.compile.target> - + <!-- nom du projet sur le labs --> + <labs.project>jrst</labs.project> + + <!-- Test --> <maven.test.skip>true</maven.test.skip> </properties> - <!--who the developers are for the project--> - <repositories> - <repository> - <id>codelutin-repository</id> - <name>CodeLutinRepository</name> - <url>http://lutinbuilder.labs.libre-entreprise.org/maven2</url> - </repository> - </repositories> <build> <plugins> <plugin> @@ -70,15 +58,6 @@ </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-site-plugin</artifactId> - <version>2.0-beta-7</version> - <configuration> - <outputEncoding>UTF-8</outputEncoding> - <locales>fr,en</locales> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <link>http://java.sun.com/j2se/api/index.html</link> @@ -123,6 +102,12 @@ <scope>compile</scope> </dependency> <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>2.7.0</version> + <scope>runtime</scope> + </dependency> + <dependency> <groupId>sdoc</groupId> <artifactId>sdoc</artifactId> <version>0.5.0-beta</version> @@ -147,18 +132,16 @@ <scope>test</scope> </dependency> <dependency> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + <version>1.1.1</version> + <scope>runtime</scope> + </dependency> + <dependency> <groupId>org.docbook</groupId> <artifactId>docbook-xsl</artifactId> <version>1.72.0</version> <scope>compile</scope> </dependency> </dependencies> - <distributionManagement> - <site> - <id>labs</id> - <url> - scp://labs.libre-entreprise.org/home/groups/${pom.artifactId}/htdocs/ - </url> - </site> - </distributionManagement> </project> Copied: trunk/jrst2/src/main/java (from rev 184, trunk/jrst2/src/java) Property changes on: trunk/jrst2/src/main/java ___________________________________________________________________ Name: svn:mergeinfo + Deleted: trunk/jrst2/src/main/java/language-en_US.properties =================================================================== --- trunk/jrst2/src/java/language-en_US.properties 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/language-en_US.properties 2008-08-27 12:57:01 UTC (rev 185) @@ -1,7 +0,0 @@ -help?=JRST\ \-\-help\ to\ display\ help -rstFile?=Please\ enter\ reStructuredText\ file\ path\ \(empty\ to\ exit\) -dontExist=Invalid\ file\ path -outputFormat?=Please\ enter\ output\ format \(xhtml\,\ docbook\,\ xml\(by\ default\)\,\ html\,\ xdoc\,\ rst\,\ pdf\,\ odt\ ou\ rtf\)\n\(empty\ to\ enter\ XSL\ files\ to\ use\) -xslFile?=Please\ enter\ XSL\ file\ path\ \(XML\ output\ if\ empty\) -outputFile?=Please\ enter\ outpout\ path\ \(empty\ to\ display\ in\ console\) -overwrite?=This\ file\ exists\,\ do\ you\ want\ to\ overwrite\ it\ \?\ \(y\/n\) Deleted: trunk/jrst2/src/main/java/language-fr_FR.properties =================================================================== --- trunk/jrst2/src/java/language-fr_FR.properties 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/language-fr_FR.properties 2008-08-27 12:57:01 UTC (rev 185) @@ -1,7 +0,0 @@ -help?=JRST --help pour afficher l'aide -rstFile?=Veuillez saisir le chemin du fichier reStructuredText (Laissez vide pour quitter) -dontExist=Ce fichier n'existe pas -outputFormat?=Veuillez saisir le format de sortie (xhtml, docbook, xml(par défault), html, xdoc, rst, pdf, odt ou rtf)\n(Laissez vide pour spécifier le ou les XSL de générations à utiliser) -xslFile?=Veuillez saisir le chemin du fichier XSL (Sortie XML si vide) -outputFile?=Veuillez saisir le chemin du fichier sortie (Laissez vide pour l'afficher dans la sortie standard) - Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/AdvancedReader.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/AdvancedReader.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/AdvancedReader.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * AdvancedReader.java @@ -209,9 +207,10 @@ /** * Unread the line length * - * @param line line used to know the length to unread - * @param addNewLine if true then add +1 to unread lenght for not present - * '\n' + * @param line + * line used to know the length to unread + * @param addNewLine + * if true then add +1 to unread lenght for not present '\n' * @return number of unread char */ public int unread(String line, boolean addNewLine) { @@ -222,9 +221,11 @@ /** * Unread the line length * - * @param lines lines used to know the length to unread - * @param addNewLine if true then add +1 for each line to unread lenght for - * not present '\n' + * @param lines + * lines used to know the length to unread + * @param addNewLine + * if true then add +1 for each line to unread lenght for not + * present '\n' * @return number of unread char */ public int unread(String[] lines, boolean addNewLine) { @@ -297,7 +298,8 @@ /** * lit un certain nombre de ligne * - * @param count si negatif lit toutes les lignes + * @param count + * si negatif lit toutes les lignes * @return * @throws IOException */ Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/DocumentHandler.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/DocumentHandler.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/DocumentHandler.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * DocumentHandler.java Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/DocumentWalker.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/DocumentWalker.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/DocumentWalker.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * DocumentWalker.java Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/JRST.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/JRST.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/JRST.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * JRST.java @@ -98,7 +96,7 @@ static final private String rst2docbook = "/xsl/dn2dbk.xsl"; // static final private String walshDir = // "/home/letellier/docbook5-xsl-1.72.0/"; - //static final private String walshDir = "/docbook-xsl-nwalsh"; + // static final private String walshDir = "/docbook-xsl-nwalsh"; static final private String walshDir = ""; // static final private String docbook2odfDir = "/docbook2odf-0.211"; @@ -218,7 +216,7 @@ */ private static String[] askOptionGraph() throws SecurityException, NoSuchMethodException { - Method m = JRSTOption.class.getMethod("getOutType", null); + Method m = JRSTOption.class.getMethod("getOutType"); Option a = m.getAnnotation(Option.class); JRSTInterface graph = new JRSTInterface(a.pattern()); @@ -366,8 +364,7 @@ public static void generate(String xslListOrOutType, File fileIn, File fileOut, Overwrite overwrite) throws Exception { - generate(xslListOrOutType, fileIn, "UTF-8", fileOut, - "UTF-8", overwrite); + generate(xslListOrOutType, fileIn, "UTF-8", fileOut, "UTF-8", overwrite); } /** @@ -402,7 +399,7 @@ Reader in = new InputStreamReader(url.openStream(), inputEncoding); JRSTReader jrst = new JRSTReader(); Document doc = jrst.read(in); - + // apply xsl on rst xml document JRSTGenerator gen = new JRSTGenerator(); String[] xsls = StringUtil.split(xslList, ","); Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTDirective.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/JRSTDirective.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTDirective.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * JRSTDirective.java Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTGenerator.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/JRSTGenerator.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTGenerator.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * JRSTGenerator.java @@ -103,7 +101,8 @@ } /** - * @param uriResolver the uriResolver to set + * @param uriResolver + * the uriResolver to set */ public void setUriResolver(URIResolver uriResolver) { this.uriResolver = uriResolver; Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTInterface.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/JRSTInterface.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTInterface.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,3 +1,21 @@ +/** + * *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* + */ package org.codelutin.jrst; import java.awt.BorderLayout; @@ -32,6 +50,9 @@ import org.codelutin.util.Resource; public class JRSTInterface extends JDialog { + /** serialVersionUID */ + private static final long serialVersionUID = 5327326730753891936L; + private JPanel savePanel = null; private JPanel formatPanel = null; @@ -92,7 +113,8 @@ /** * le parametre initialise les options disponibles * - * @param String o + * @param String + * o */ public JRSTInterface(String o) { // language @@ -109,7 +131,7 @@ this.add(getPanelPrincipal(), BorderLayout.CENTER); Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); this.setModal(true); // pour que JRST attende que cette fenetre soit - // ferme + // ferme this.pack(); this.setResizable(false); this.setLocation(dim.width / 2 - this.getWidth() / 2, dim.height / 2 Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTLexer.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/JRSTLexer.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTLexer.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * JRSTLexer.java @@ -258,7 +256,8 @@ * Read block text, block text have same indentation and is continu (no * blank line) * - * @param minLeftMargin min left blank needed to accept to read block + * @param minLeftMargin + * min left blank needed to accept to read block * @return String[] * @throws IOException */ @@ -279,7 +278,8 @@ /** * All lines are joined and left and right spaces are removed during join * - * @param String[] lines + * @param String + * [] lines * @return String */ private String joinBlock(String[] lines) { @@ -291,9 +291,12 @@ * All lines are joined whith the String joinSep and left and right spaces * are removed if trim * - * @param String[] lines - * @param String joinSep - * @param Boolean trim + * @param String + * [] lines + * @param String + * joinSep + * @param Boolean + * trim * @return String */ private String joinBlock(String[] lines, String joinSep, boolean trim) { @@ -1512,7 +1515,7 @@ Pattern pBordersTiret = Pattern.compile("^\\s*(-+ +)+-+\\s*$"); // Separation // - Pattern pBorders = Pattern.compile("^\\s*([=-]+ +)+[=-]+\\s*$"); // = - // ou + // ou // - String[] table = in.readUntilBlank(); // Recuperation de la // table @@ -2202,7 +2205,8 @@ /** * Read block text, block text have same indentation * - * @param minLeftMargin min left blank needed to accept to read block + * @param minLeftMargin + * min left blank needed to accept to read block * @return String * @throws IOException */ @@ -2283,7 +2287,8 @@ } /** - * @param String line + * @param String + * line * @return int * @throws IOException */ Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTReader.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/JRSTReader.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/JRSTReader.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * JRSTReader.java @@ -329,7 +327,8 @@ } /** - * @param defaultDirectives the defaultDirectives to set + * @param defaultDirectives + * the defaultDirectives to set */ public static void addDefaultDirectives(String name, JRSTDirective directive) { JRSTReader.defaultDirectives.put(name, directive); @@ -343,7 +342,8 @@ } /** - * @param JRSTDirective the defaultDirectives to set + * @param JRSTDirective + * the defaultDirectives to set */ public void addDirectives(String name, JRSTDirective directive) { directives.put(name, directive); @@ -480,7 +480,8 @@ } /** - * @param LinkedList <Element> title, String num + * @param LinkedList + * <Element> title, String num * @return Element */ private Element composeLineContent(LinkedList<Element> title, String num) { @@ -1147,7 +1148,8 @@ * Body. * </pre> * - * @param Element item + * @param Element + * item * @return Element * @throws Exception */ @@ -1795,9 +1797,12 @@ } /** - * @param Element e1 - * @param Element e2 - * @param String ... attnames + * @param Element + * e1 + * @param Element + * e2 + * @param String + * ... attnames * @return boolean */ private boolean hasSameAttribute(Element e1, Element e2, String... attnames) { @@ -1814,8 +1819,10 @@ } /** - * @param Element from - * @param Element to + * @param Element + * from + * @param Element + * to * @throws DocumentException */ private void copyLevel(Element from, Element to) throws DocumentException { @@ -1827,8 +1834,10 @@ } /** - * @param String name - * @param Element e + * @param String + * name + * @param Element + * e * @return boolean * @throws DocumentException */ @@ -1838,8 +1847,10 @@ } /** - * @param String name - * @param Element e + * @param String + * name + * @param Element + * e * @param boolean throwError * @param boolean eof * @return boolean @@ -1856,8 +1867,10 @@ } /** - * @param String name - * @param Element e + * @param String + * name + * @param Element + * e * @return boolean */ private boolean itemNotEquals(String name, Element e) { @@ -1911,7 +1924,8 @@ /** * Parse text in element and replace text with parse result * - * @param Element e + * @param Element + * e * @throws DocumentException */ private void inline(Element e) throws DocumentException { @@ -2174,4 +2188,4 @@ e.setText(""); e.appendContent(result); } -} \ No newline at end of file +} Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/ReStructuredText.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/ReStructuredText.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/ReStructuredText.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * Docbook.java Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/directive/ContentDirective.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/directive/ContentDirective.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/directive/ContentDirective.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,3 +1,20 @@ +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* + */ package org.codelutin.jrst.directive; import org.codelutin.jrst.JRSTDirective; Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/directive/DateDirective.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/directive/DateDirective.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/directive/DateDirective.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * DateDirective.java Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/directive/ImageDirective.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/directive/ImageDirective.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/directive/ImageDirective.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * Image.java Modified: trunk/jrst2/src/main/java/org/codelutin/jrst/directive/SectnumDirective.java =================================================================== --- trunk/jrst2/src/java/org/codelutin/jrst/directive/SectnumDirective.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/java/org/codelutin/jrst/directive/SectnumDirective.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,3 +1,20 @@ +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* + */ package org.codelutin.jrst.directive; import org.codelutin.jrst.JRSTDirective; Copied: trunk/jrst2/src/main/resources (from rev 184, trunk/jrst2/src/resources) Property changes on: trunk/jrst2/src/main/resources ___________________________________________________________________ Name: svn:mergeinfo + Deleted: trunk/jrst2/src/main/resources/log4j.properties =================================================================== --- trunk/jrst2/src/resources/log4j.properties 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/main/resources/log4j.properties 2008-08-27 12:57:01 UTC (rev 185) @@ -1,9 +0,0 @@ -# Global logging configuration -log4j.rootLogger=DEBUG, stdout -# Console output... -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%5p (%F:%L) %m%n - -# package level -#log4j.logger.org.codelutin.jrst=DEBUG \ No newline at end of file Copied: trunk/jrst2/src/test/java/org (from rev 184, trunk/jrst2/src/test/org) Property changes on: trunk/jrst2/src/test/java/org ___________________________________________________________________ Name: svn:mergeinfo + Modified: trunk/jrst2/src/test/java/org/codelutin/jrst/AdvancedReaderTest.java =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/AdvancedReaderTest.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/AdvancedReaderTest.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * AdvancedReaderTest.java @@ -40,34 +38,30 @@ import java.io.StringReader; import java.io.Writer; - /** * @author poussin - * + * */ public class AdvancedReaderTest extends TestCase { - String text = "\t\t\n" + - "1 toto tata tutu\n" + - "2 toto tata tutu\n" + - "3 toto tata tutu\n" + - "4 toto tata tutu\n" + - "5 toto tata tutu\n" + - "6 toto tata tutu\n" + - "7 toto tata tutu\n" + - "8 toto tata tutu\n" + - "9 toto tata tutu\n"; - + String text = "\t\t\n" + "1 toto tata tutu\n" + "2 toto tata tutu\n" + + "3 toto tata tutu\n" + "4 toto tata tutu\n" + + "5 toto tata tutu\n" + "6 toto tata tutu\n" + + "7 toto tata tutu\n" + "8 toto tata tutu\n" + + "9 toto tata tutu\n"; + File file = null; - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see junit.framework.TestCase#setUp() */ public AdvancedReaderTest() throws Exception { file = File.createTempFile("test-AdvancedReader", ".txt"); file.deleteOnExit(); - + Writer out = new BufferedWriter(new FileWriter(file)); out.write(text); out.close(); @@ -81,15 +75,16 @@ assertFalse(in.eof()); in.readAll(); assertTrue(in.eof()); - + in = new AdvancedReader(new StringReader(text)); assertFalse(in.eof()); in.readAll(); - assertTrue(in.eof()); + assertTrue(in.eof()); } /** - * Test method for {@link org.codelutin.jrst.AdvancedReader#skip_blank_lines()}. + * Test method for + * {@link org.codelutin.jrst.AdvancedReader#skip_blank_lines()}. */ public void testSkipBlankLines() throws Exception { { @@ -98,7 +93,7 @@ String line = in.readLine(); assertEquals("1 toto tata tutu", line); } - + { AdvancedReader in = new AdvancedReader(new StringReader(text)); in.skipBlankLines(); @@ -113,21 +108,21 @@ public void testReadAll() throws Exception { { AdvancedReader in = new AdvancedReader(new FileReader(file)); - String [] lines = in.readAll(); + String[] lines = in.readAll(); assertEquals(10, lines.length); assertEquals("\t\t", lines[0]); assertEquals("1 toto tata tutu", lines[1]); assertEquals("9 toto tata tutu", lines[9]); } - + { AdvancedReader in = new AdvancedReader(new StringReader(text)); - String [] lines = in.readAll(); + String[] lines = in.readAll(); assertEquals(10, lines.length); assertEquals("\t\t", lines[0]); assertEquals("1 toto tata tutu", lines[1]); assertEquals("9 toto tata tutu", lines[9]); - } + } } /** @@ -136,42 +131,43 @@ public void testReadLines() throws Exception { { AdvancedReader in = new AdvancedReader(new FileReader(file)); - String [] lines = in.readLines(3); + String[] lines = in.readLines(3); assertEquals(3, lines.length); assertEquals("\t\t", lines[0]); assertEquals("1 toto tata tutu", lines[1]); assertEquals("2 toto tata tutu", lines[2]); } - + { AdvancedReader in = new AdvancedReader(new StringReader(text)); - String [] lines = in.readLines(3); + String[] lines = in.readLines(3); assertEquals(3, lines.length); assertEquals("\t\t", lines[0]); assertEquals("1 toto tata tutu", lines[1]); assertEquals("2 toto tata tutu", lines[2]); - } + } } /** - * Test method for {@link org.codelutin.jrst.AdvancedReader#readUntil(java.lang.String)}. + * Test method for + * {@link org.codelutin.jrst.AdvancedReader#readUntil(java.lang.String)}. */ public void testReadUntil() throws Exception { { AdvancedReader in = new AdvancedReader(new FileReader(file)); - String [] lines = in.readUntil("^3.*$"); + String[] lines = in.readUntil("^3.*$"); assertEquals(3, lines.length); assertEquals("\t\t", lines[0]); assertEquals("1 toto tata tutu", lines[1]); assertEquals("2 toto tata tutu", lines[2]); - + String line = in.readLine(); assertEquals("3 toto tata tutu", line); } { AdvancedReader in = new AdvancedReader(new StringReader(text)); - String [] lines = in.readUntil("^3.*$"); + String[] lines = in.readUntil("^3.*$"); assertEquals(3, lines.length); assertEquals("\t\t", lines[0]); assertEquals("1 toto tata tutu", lines[1]); @@ -183,18 +179,19 @@ } /** - * Test method for {@link org.codelutin.jrst.AdvancedReader#readUntil(java.lang.String)}. + * Test method for + * {@link org.codelutin.jrst.AdvancedReader#readUntil(java.lang.String)}. */ public void testReadWhile() throws Exception { { AdvancedReader in = new AdvancedReader(new FileReader(file)); in.skipBlankLines(); - String [] lines = in.readWhile("^[123].*$"); + String[] lines = in.readWhile("^[123].*$"); assertEquals(3, lines.length); assertEquals("1 toto tata tutu", lines[0]); assertEquals("2 toto tata tutu", lines[1]); assertEquals("3 toto tata tutu", lines[2]); - + String line = in.readLine(); assertEquals("4 toto tata tutu", line); } @@ -202,12 +199,12 @@ { AdvancedReader in = new AdvancedReader(new StringReader(text)); in.skipBlankLines(); - String [] lines = in.readWhile("^[123].*$"); + String[] lines = in.readWhile("^[123].*$"); assertEquals(3, lines.length); assertEquals("1 toto tata tutu", lines[0]); assertEquals("2 toto tata tutu", lines[1]); assertEquals("3 toto tata tutu", lines[2]); - + String line = in.readLine(); assertEquals("4 toto tata tutu", line); } @@ -226,7 +223,7 @@ line = in.readLine(); assertEquals("2 toto tata tutu", line); } - + { AdvancedReader in = new AdvancedReader(new StringReader(text)); String line = in.readLine(); @@ -235,7 +232,7 @@ assertEquals("1 toto tata tutu", line); line = in.readLine(); assertEquals("2 toto tata tutu", line); - } + } } public void testMark() throws Exception { @@ -248,7 +245,7 @@ line = in.readLine(); assertEquals("1 toto tata tutu", line); } - + public void testUnread() throws Exception { AdvancedReader in = new AdvancedReader(new StringReader(text)); assertEquals(0, in.getCharNumber()); @@ -280,5 +277,3 @@ } } - - Modified: trunk/jrst2/src/test/java/org/codelutin/jrst/Compare.java =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/Compare.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/Compare.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,4 +1,22 @@ /** + * *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* + */ +/** * Class de test pour comparer le XML de DocUtils avec celui du JRST * */ @@ -33,8 +51,6 @@ static boolean[] bColorPython; - private static final String PATH = "/home/letellier/PROJET/jrst2/"; // a - // redefinir // manuelement static public void main(String[] args) throws Exception { @@ -47,7 +63,6 @@ System.err.println("Argument source manquant"); } - @SuppressWarnings("deprecation") private static void parser(File source) throws Exception { URL url = source.toURL(); Reader in = new InputStreamReader(url.openStream()); @@ -58,7 +73,7 @@ ThreadRedirection t = new ThreadRedirection(p); t.start(); p.waitFor(); // On attend que le processus ce termine - String strPython=t.getSortit().replaceAll("null",""); + String strPython = t.getSortit().replaceAll("null", ""); t.stop(); p.destroy(); SAXReader sr = new SAXReader(); @@ -83,7 +98,8 @@ XMLUnit.setIgnoreAttributeOrder(true); XMLUnit.setNormalizeWhitespace(true); XMLCaseTest test = new XMLCaseTest("test"); - DetailedDiff myDiff = test.testAllDifferences(docPython.asXML(), docRst.asXML()); + DetailedDiff myDiff = test.testAllDifferences(docPython.asXML(), docRst + .asXML()); List allDifferences = myDiff.getAllDifferences(); String text = ""; Pattern pattern = Pattern.compile("at\\s(\\/\\w+\\[\\d+])+"); Modified: trunk/jrst2/src/test/java/org/codelutin/jrst/GutterColor.java =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/GutterColor.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/GutterColor.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,34 +1,52 @@ /** + * *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* + */ +/** * numerotation des lignes * */ package org.codelutin.jrst; + /* -* -* Created on 1 aout 2005, 17:45 -* -* Copyright (C) 2005 Yves Zoundi -* MOdified by Jason Davis -* -* This library is free software; you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published -* by the Free Software Foundation; either version 2.1 of the License, or -* (at your option) any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ + * + * Created on 1 aout 2005, 17:45 + * + * Copyright (C) 2005 Yves Zoundi + * MOdified by Jason Davis + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ import java.awt.Color; import java.awt.Dimension; import java.awt.FontMetrics; -import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.RenderingHints; @@ -41,63 +59,58 @@ import javax.swing.JScrollPane; import javax.swing.text.JTextComponent; - /** -* A class which adds line numbering to a editor -* -* @author Yves Zoundi -*/ -public final class GutterColor extends JLabel -{ + * A class which adds line numbering to a editor + * + * @author Yves Zoundi + */ +public final class GutterColor extends JLabel { + /** serialVersionUID */ + private static final long serialVersionUID = -4419253280014127529L; private JTextComponent edit; private int rhWidth = 40; boolean[] bColors; + /** * * @param edit - * the editor which has to display line numbers + * the editor which has to display line numbers */ - public GutterColor(JTextComponent edit, JScrollPane pane, boolean[] bColors) - { + public GutterColor(JTextComponent edit, JScrollPane pane, boolean[] bColors) { this.edit = edit; this.bColors = bColors; - //listen for font change - edit.addPropertyChangeListener(new PropertyChangeListener() - { - public void propertyChange(PropertyChangeEvent evt) - { - if(evt.getPropertyName().equals("font")) - { + // listen for font change + edit.addPropertyChangeListener(new PropertyChangeListener() { + public void propertyChange(PropertyChangeEvent evt) { + if (evt.getPropertyName().equals("font")) { revalidate(); repaint(); } } }); - + setBackground(Color.GRAY); setForeground(Color.GRAY.darker()); - - pane.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() - { - public void adjustmentValueChanged(AdjustmentEvent e) - { - revalidate(); - repaint(); - } - }); + + pane.getVerticalScrollBar().addAdjustmentListener( + new AdjustmentListener() { + public void adjustmentValueChanged(AdjustmentEvent e) { + revalidate(); + repaint(); + } + }); } /** * * @return The preferred size of the line numbering column */ - public Dimension getPreferredSize() - { + public Dimension getPreferredSize() { FontMetrics fm = edit.getFontMetrics(edit.getFont()); int h = fm.getHeight(); int w = fm.stringWidth(String.valueOf(edit.getHeight() / h)) + 6; - + rhWidth = w; int hi = (int) edit.getPreferredSize().getHeight(); return new Dimension(w, hi); @@ -106,20 +119,20 @@ /** * * @param g - * A graphic component + * A graphic component */ - public void paintComponent(java.awt.Graphics g) - { + public void paintComponent(java.awt.Graphics g) { super.paintComponent(g); Graphics2D g2d = (Graphics2D) g; - g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF); - + g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_OFF); + g2d.setFont(edit.getFont()); FontMetrics fm = g2d.getFontMetrics(); - + Rectangle rec = edit.getVisibleRect(); - + int h = fm.getHeight(); int row = rec.y / h; int i = h - fm.getDescent(); @@ -127,32 +140,28 @@ int max = row + (rec.height / h) + 2; boolean doWhite = false; - while (row < max) - { + while (row < max) { String s = Integer.toString(row + 1) + " "; boolean white = false; - if (bColors.length>row+1){ - if (bColors[row+1]){ + if (bColors.length > row + 1) { + if (bColors[row + 1]) { g2d.setColor(Color.RED); - g2d.fill3DRect(1, i+3, rhWidth-4, 15, false); - white=true; - - } - else - white=false; - } - else - white=false; - if (doWhite){ + g2d.fill3DRect(1, i + 3, rhWidth - 4, 15, false); + white = true; + + } else + white = false; + } else + white = false; + if (doWhite) { g2d.setColor(Color.WHITE); g2d.drawString(s, (rhWidth + 9) - fm.stringWidth(s), i); - } - else{ + } else { g2d.setColor(Color.GRAY.darker()); g2d.drawString(s, (rhWidth + 9) - fm.stringWidth(s), i); } - doWhite=white; - + doWhite = white; + i += h; row++; } @@ -161,4 +170,3 @@ g2d.drawLine(getWidth() - 3, rec.y, getWidth() - 3, rec.height + rec.y); } } - Modified: trunk/jrst2/src/test/java/org/codelutin/jrst/JRSTGeneratorTest.java =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/JRSTGeneratorTest.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/JRSTGeneratorTest.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * JRSTGenerator.java @@ -33,35 +31,52 @@ import junit.framework.TestCase; - /** * @author poussin - * + * */ public class JRSTGeneratorTest extends TestCase { public void testRstToHtml() throws Exception { long time0 = System.currentTimeMillis(); - JRST.main(new String[]{"src/test/org/codelutin/jrst/text.rst"}); - System.err.println("==================================================================="); + + // test 1 : + JRST.main(new String[] { "-t", "rst", "-o", "html", "src/test/resources/test.rst", }); + System.err + .println("==================================================================="); long time1 = System.currentTimeMillis(); - JRST.main(new String[]{"-t", "html", "src/test/org/codelutin/jrst/text.rst"}); - System.err.println("==================================================================="); + + // test 2 : + JRST.main(new String[] { "-t", "html", + "src/test/resources/text.rst" }); + System.err + .println("==================================================================="); long time2 = System.currentTimeMillis(); -// JRST.main(new String[]{"-t", "docbook", "src/test/org/codelutin/jrst/text.rst"}); - System.err.println("==================================================================="); + + // test 3 : + // JRST.main(new String[]{"-t", "docbook", + // "src/test/resources/text.rst"}); + System.err + .println("==================================================================="); long time3 = System.currentTimeMillis(); -// JRST.main(new String[]{"-t", "xhtml", "src/test/org/codelutin/jrst/text.rst"}); - System.err.println("==================================================================="); + + // test 4 : + // JRST.main(new String[]{"-t", "xhtml", + // "src/test/resources/text.rst"}); + System.err + .println("==================================================================="); long time4 = System.currentTimeMillis(); - JRST.main(new String[]{"-t", "xdoc", "src/test/org/codelutin/jrst/text.rst"}); + + // test 5 : + JRST.main(new String[] { "-t", "xdoc", + "src/test/resources/text.rst" }); long time5 = System.currentTimeMillis(); - - System.out.println("time generation: " + (time1-time0) + ":" +(time2-time1) + ":"+ (time3-time2) + ":"+ (time4-time3) + ":"+ (time5-time4)); + + System.out.println("time generation: " + (time1 - time0) + ":" + + (time2 - time1) + ":" + (time3 - time2) + ":" + + (time4 - time3) + ":" + (time5 - time4)); } } - - Modified: trunk/jrst2/src/test/java/org/codelutin/jrst/JRSTReaderTest.java =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/JRSTReaderTest.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/JRSTReaderTest.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +1,19 @@ -/* *##% - * Copyright (C) 2006 - * Code Lutin, Cédric Pineau, Benjamin Poussin +/* *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/ /* * * JRSTReaderTest.java @@ -40,34 +38,33 @@ import java.io.Reader; import java.net.URL; - /** * @author poussin - * + * */ public class JRSTReaderTest extends TestCase { public void testRead() throws Exception { - URL url = JRSTReaderTest.class.getResource("/org/codelutin/jrst/text.rst"); + URL url = JRSTReaderTest.class + .getResource("/test.rst"); Reader in = new InputStreamReader(url.openStream()); - + JRSTReader jrst = new JRSTReader(); Document doc = jrst.read(in); - + { - XMLWriter out = new XMLWriter(System.out, new OutputFormat(" ", true)); + XMLWriter out = new XMLWriter(System.out, new OutputFormat(" ", + true)); out.write(doc); } - -// { -// StringWriter out = new StringWriter(); -// JRSTGenerator gen = new JRSTGenerator(out); -// gen.generate(doc); -// System.out.println(out.toString()); -// } + + // { + // StringWriter out = new StringWriter(); + // JRSTGenerator gen = new JRSTGenerator(out); + // gen.generate(doc); + // System.out.println(out.toString()); + // } } } - - Modified: trunk/jrst2/src/test/java/org/codelutin/jrst/ThreadRedirection.java =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/ThreadRedirection.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/ThreadRedirection.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,3 +1,21 @@ +/** + * *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* + */ /* * Class qui redirige la sortie standard pour la laisser en interne */ @@ -7,25 +25,27 @@ import java.io.IOException; import java.io.InputStreamReader; -public class ThreadRedirection extends Thread{ +public class ThreadRedirection extends Thread { String str; String errors; Process process; - public ThreadRedirection (Process p){ - process=p; + + public ThreadRedirection(Process p) { + process = p; } + public void run() { try { - BufferedReader reader = new BufferedReader( - new InputStreamReader(process.getInputStream())); + BufferedReader reader = new BufferedReader(new InputStreamReader( + process.getInputStream())); BufferedReader readerErrors = new BufferedReader( new InputStreamReader(process.getErrorStream())); try { String line; - while ( ( line = reader.readLine () ) != null ) { - if (line!=null){ + while ((line = reader.readLine()) != null) { + if (line != null) { if (!line.equals("null")) - str += "\n"+line; + str += "\n" + line; } } @@ -34,12 +54,12 @@ } try { String line; - while ( ( line = readerErrors.readLine () ) != null ) { - if (line!=null){ + while ((line = readerErrors.readLine()) != null) { + if (line != null) { if (!line.equals(null)) - errors += "\n"+line; + errors += "\n" + line; } - + } } finally { @@ -51,17 +71,18 @@ } public String getSortit() { - - String result=""; + + String result = ""; for (String l : str.split("\n")) - if (!l.equals("null")){ - result+=l+"\n"; + if (!l.equals("null")) { + result += l + "\n"; } - + return result; } - public String getErrors(){ + + public String getErrors() { return errors; } - + } Modified: trunk/jrst2/src/test/java/org/codelutin/jrst/XMLCaseTest.java =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/XMLCaseTest.java 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/XMLCaseTest.java 2008-08-27 12:57:01 UTC (rev 185) @@ -1,4 +1,22 @@ /** + * *##% JRst + * Copyright (C) 2004 - 2008 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%* + */ +/** * Compare les 2 xml avec XMLUnit * */ @@ -7,20 +25,17 @@ import org.custommonkey.xmlunit.DetailedDiff; import org.custommonkey.xmlunit.XMLTestCase; - - public class XMLCaseTest extends XMLTestCase { public XMLCaseTest(String name) { super(name); } - + public DetailedDiff testAllDifferences(String myControlXML, String myTestXML) + throws Exception { + DetailedDiff myDiff = new DetailedDiff(compareXML(myControlXML, + myTestXML)); + return myDiff; - public DetailedDiff testAllDifferences(String myControlXML,String myTestXML) throws Exception { - DetailedDiff myDiff = new DetailedDiff(compareXML(myControlXML, myTestXML)); - return myDiff; - } - } Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/comparePython.xml =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/comparePython.xml 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/comparePython.xml 2008-08-27 12:57:01 UTC (rev 185) @@ -1,279 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd"> -<!-- Generated by Docutils 0.3.7 --> -<document id="parseur-restructuredtext-le-jrst" name="parseur restructuredtext : le jrst" source="/home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/frEntier.rst"><title>Parseur reStructuredText : le JRst</title><docinfo><author>Sylvain LETELLIER <<reference refuri="mailto:letellier@codelutin">letellier@codelutin</reference>></author><organization>Code Lutin</organization><date>$date: 01/06/2007$</date><copyright>© 2007. JRST - Code Lutin - GPL</copyright></docinfo><topic class="contents" id="sommaire" name="sommaire"><title>Sommaire</title><bullet_list class="auto-toc"><list_item><paragraph><reference id="id25" refid="documentation-utilisateur"><generated class="sectnum">1 </generated>Documentation utilisateur</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id26" refid="pr-sentation"><generated class="sectnum">1.1 </generated>Présentation</reference></paragraph></list_item><list_item><paragraph><reference id="id27" refid="usage"><generated class="sectnum">1.2 </generated>Usage</reference></paragraph></list_item><list_item><paragraph><reference id="id28" refid="plugin-maven"><generated class="sectnum">1.3 </generated>Plugin maven</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id29" refid="introduction-restructuredtext"><generated class="sectnum">2 </generated>Introduction à ReStructuredText</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id30" refid="structure"><generated class="sectnum">2.1 </generated>Structure</reference></paragraph></list_item><list_item><paragraph><reference id="id31" refid="styles-de-texte"><generated class="sectnum">2.2 </generated>Styles de texte</reference></paragraph></list_item><list_item><paragraph><reference id="id32" refid="listes"><generated class="sectnum">2.3 </generated>Listes</reference></paragraph></list_item><list_item><paragraph><reference id="id33" refid="pr-formatage"><generated class="sectnum">2.4 </generated>Préformatage</reference></paragraph></list_item><list_item><paragraph><reference id="id34" refid="sections"><generated class="sectnum">2.5 </generated>Sections</reference></paragraph></list_item><list_item><paragraph><reference id="id35" refid="images"><generated class="sectnum">2.6 </generated>Images</reference></paragraph></list_item><list_item><paragraph><reference id="id36" refid="et-ensuite"><generated class="sectnum">2.7 </generated>Et ensuite ?</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id37" refid="le-xsl-extensible-stylesheets-language"><generated class="sectnum">3 </generated>Le XSL (Extensible Stylesheets Language)</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id38" refid="id19"><generated class="sectnum">3.1 </generated>Présentation</reference></paragraph></list_item><list_item><paragraph><reference id="id39" refid="structure-d-un-document-xsl"><generated class="sectnum">3.2 </generated>Structure d'un document XSL</reference></paragraph></list_item><list_item><paragraph><reference id="id40" refid="association-d-une-feuille-xsl-un-document-xml"><generated class="sectnum">3.3 </generated>Association d'une feuille XSL à un document XML</reference></paragraph></list_item><list_item><paragraph><reference id="id41" refid="les-template-rules-r-gles-de-gabarit"><generated class="sectnum">3.4 </generated>Les template rules (règles de gabarit)</reference></paragraph></list_item><list_item><paragraph><reference id="id42" refid="r-f-rences"><generated class="sectnum">3.5 </generated>Références</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id43" refid="documentation-d-veloppeur"><generated class="sectnum">4 </generated>Documentation développeur</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id44" refid="le-diagramme-de-class"><generated class="sectnum">4.1 </generated>Le diagramme de Class</reference></paragraph></list_item><list_item><paragraph><reference id="id45" refid="la-g-n-ration"><generated class="sectnum">4.2 </generated>La génération</reference></paragraph></list_item><list_item><paragraph><reference id="id46" refid="exemple-d-utilisation"><generated class="sectnum">4.3 </generated>Exemple d'utilisation</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id47" refid="fonctionnalit-s-propos-es"><generated class="sectnum">5 </generated>Fonctionnalités proposées</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id48" refid="fonctionnalit-s-implant-es"><generated class="sectnum">5.1 </generated>Fonctionnalités implantées</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id49" refid="element-racine"><generated class="sectnum">5.1.1 </generated>Element racine</reference></paragraph></list_item><list_item><paragraph><reference id="id50" refid="elements-titre"><generated class="sectnum">5.1.2 </generated>Elements titre</reference></paragraph></list_item><list_item><paragraph><reference id="id51" refid="elements-bibliographiques"><generated class="sectnum">5.1.3 </generated>Elements bibliographiques</reference></paragraph></list_item><list_item><paragraph><reference id="id52" refid="elements-de-d-coration"><generated class="sectnum">5.1.4 </generated>Elements de décoration</reference></paragraph></list_item><list_item><paragraph><reference id="id53" refid="elements-structurels"><generated class="sectnum">5.1.5 </generated>Elements structurels</reference></paragraph></list_item><list_item><paragraph><reference id="id54" refid="elements-du-corps"><generated class="sectnum">5.1.6 </generated>Elements du corps</reference></paragraph></list_item><list_item><paragraph><reference id="id55" refid="elements-des-tableaux"><generated class="sectnum">5.1.7 </generated>Elements des tableaux</reference></paragraph></list_item><list_item><paragraph><reference id="id56" refid="elements-de-la-ligne"><generated class="sectnum">5.1.8 </generated>Elements de la ligne</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id57" refid="fonctionnalit-s-non-implant-es"><generated class="sectnum">5.2 </generated>Fonctionnalités non-implantées</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id58" refid="les-diff-rentes-librairies-utilis-es"><generated class="sectnum">6 </generated>Les différentes librairies utilisées</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id59" refid="dom4j"><generated class="sectnum">6.1 </generated>dom4j</reference></paragraph></list_item><list_item><paragraph><reference id="id60" refid="javax-xml-transform"><generated class="sectnum">6.2 </generated>javax.xml.transform</reference></paragraph></list_item><list_item><paragraph><reference id="id61" refid="sdoc"><generated class="sectnum">6.3 </generated>SDoc</reference></paragraph></list_item><list_item><paragraph><reference id="id62" refid="xmlunit"><generated class="sectnum">6.4 </generated>Xmlunit</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id63" refid="documentation-externe"><generated class="sectnum">7 </generated>Documentation externe</reference></paragraph></list_item></bullet_list></topic><section id="documentation-utilisateur" name="documentation utilisateur"><title auto="1" refid="id25"><generated class="sectnum">1 </generated>Documentation utilisateur</title><section dupname="présentation" id="pr-sentation"><title auto="1" refid="id26"><generated class="sectnum">1.1 </generated>Présentation</title><paragraph>Le format reStructuredText est un format de description de documents. A l'image -d'autres LaTeX ou DocBook, il peut être décliné en une multitude de formats. Ces -formats souffrent habituellement d'une syntaxe envahissante qui, si elle est -nécessaire pour des documents très spécifiques, devient gênante quand il s'agit -de créer rapidement un document pas trop complexe. RST dispose quant à lui d'une -syntaxe tellement simple qu'elle en devient presque invisible.</paragraph><paragraph>JRST est un parseur RST en Java permettant de créer une représentation en arbre -d'un document. Il devient alors facile de générer une représentation du document -vers différents formats.</paragraph></section><section id="usage" name="usage"><title auto="1" refid="id27"><generated class="sectnum">1.2 </generated>Usage</title><paragraph>Le parser JRST prend un fichier reStructuredText en entré et génère un fichier XML qui pourra ensuite servir à produire divers formats de fichiers grâce à des fichiers XSL de générations. Les formats de sortie disponibles sont le html, le xhtml, le rst, le pdf, le docbook, le odt (Open-Office), le rtf, ou encore le XML.</paragraph><literal_block xml:space="preserve">JRST myfile.rst</literal_block><paragraph>Cette commande aura pour effet de convertir le fichier myfile.rst en XML qui sera affiché sur la sortie standard (console). -Plusieurs options sont disponibles :</paragraph><option_list><option_list_item><option_group><option><option_string>-o</option_string><option_argument delimiter=" ">file</option_argument></option><option><option_string>--outFile</option_string><option_argument delimiter="=">file</option_argument></option></option_group><description><paragraph>pour rediriger la sortie vers un fichier.</paragraph></description></option_list_item><option_list_item><option_group><option><option_string>-t</option_string><option_argument delimiter=" ">format</option_argument></option><option><option_string>--outType</option_string><option_argument delimiter=" ">format</option_argument></option></option_group><description><paragraph>pour préciser un format de sortie, donc utiliser un fichier XSL de génération. Plusieurs formats sont disponibles xhtml, docbook, xml, html, xdoc, rst, pdf, odt, rtf.</paragraph></description></option_list_item><option_list_item><option_group><option><option_string>-x</option_string><option_argument delimiter=" ">xslFile</option_argument></option><option><option_string>--xslFile</option_string><option_argument delimiter=" ">xslFile</option_argument></option></option_group><description><paragraph>sert à préciser le fichier xsl de génération à utiliser.</paragraph></description></option_list_item><option_list_item><option_group><option><option_string>--force</option_string></option></option_group><description><paragraph>forcer l'écriture d'un fichier, si le fichier de sortie existe, il sera remplacé.</paragraph></description></option_list_item><option_list_item><option_group><option><option_string>--help</option_string></option></option_group><description><paragraph>pour afficher les options disponibles :</paragraph></description></option_list_item></option_list><literal_block xml:space="preserve">Usage: [options] FILE - [--force] : overwrite existing out file - [--help] : display this help and exit - [--outFile -o value] : Output file - [--outType -t /xhtml|docbook|xml|html|xdoc|rst/] : Output type - [--xslFile -x value] : XSL file list to apply, comma separated</literal_block><paragraph>ex :</paragraph><literal_block xml:space="preserve">JRST --force -t html -o myfile.html myfile.rst</literal_block><paragraph>Cette commande produira un fichier html (myfile.html) à partir du fichier reStructuredText (myfile.rst) même si myfile.html existe déjà.</paragraph></section><section id="plugin-maven" name="plugin maven"><title auto="1" refid="id28"><generated class="sectnum">1.3 </generated>Plugin maven</title><paragraph>Un plugin maven est disponnible à l'adresse suivante -<reference refuri="http://jrst.labs.libre-entreprise.org/maven-jrst-plugin">http://jrst.labs.libre-entreprise.org/maven-jrst-plugin</reference>. Il permet l'utilisation -depuis maven de JRst.</paragraph></section></section><section id="introduction-restructuredtext" name="introduction à restructuredtext"><title auto="1" refid="id29"><generated class="sectnum">2 </generated>Introduction à ReStructuredText</title><paragraph>Document adaptée du document de Richard Jones : <reference refuri="http://docutils.sourceforge.net/sandbox/wilk/french/quickstart-fr.html">http://docutils.sourceforge.net/sandbox/wilk/french/quickstart-fr.html</reference></paragraph><paragraph>Ce texte contient des liens de la forme "(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html">quickref</reference>)". Ils sont -relatifs au manuel de référence utilisateur <reference name="Quick reStructuredText" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html">Quick reStructuredText</reference>. -S'ils ne fonctionnent pas, référez vous au document <reference name="master quick reference" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html">master quick -reference</reference>.</paragraph><target anonymous="1" id="id1" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html"/><target id="quick-restructuredtext" name="quick restructuredtext" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html"/><target id="master-quick-reference" name="master quick reference" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html"/><section id="structure" name="structure"><title auto="1" refid="id30"><generated class="sectnum">2.1 </generated>Structure</title><paragraph>Pour commencer, il me semble que "Structured Text" n'est pas tout à fait la -bonne appellation. Nous devrions plutôt le nommer "Relaxed Text" qui contient -quelques schémas logiques. Ces schémas sont interprétés par un convertisseur -HTML pour produire "Very Structured Text" (un texte très structuré) qui pourra -être utilisé par un navigateur web.</paragraph><paragraph>Le schéma le plus simple est le <strong>paragraphe</strong> (<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#paragraphs">quickref</reference>). -C'est un bloc de texte séparé par des lignes vides (une seule suffit). -Les paragraphes doivent avoir le même décalage -- c'est à dire des espaces -à gauche. Ces paragraphes produiront un texte décalé. Par exemple:</paragraph><literal_block xml:space="preserve">Ceci est un paragraphe. -Très court. - - Le texte de ce paragraphe sera décalé, - généralement utilisé pour des citations. - -En voilà un autre</literal_block><paragraph>Le résultat donne :</paragraph><block_quote><paragraph>Ceci est un paragraphe. -Très court.</paragraph><block_quote><paragraph>Le texte de ce paragraphe sera décalé, -généralement utilisé pour des citations.</paragraph></block_quote><paragraph>En voilà un autre</paragraph></block_quote><target anonymous="1" id="id2" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#paragraphs"/></section><section id="styles-de-texte" name="styles de texte"><title auto="1" refid="id31"><generated class="sectnum">2.2 </generated>Styles de texte</title><paragraph>(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#inline-markup">quickref</reference>)</paragraph><target anonymous="1" id="id3" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#inline-markup"/><paragraph>Dans les paragraphes et le corps du texte, nous pouvons utiliser -des marqueurs pour <emphasis>italique</emphasis> avec "`` <emphasis>italique</emphasis> <literal>" ou **gras** -avec "</literal> <strong>gras</strong> <problematic id="id5" refid="id4">``</problematic>".</paragraph><system_message backrefs="id5" id="id4" level="2" line="136" source="/home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/frEntier.rst" type="WARNING"><paragraph>Inline literal start-string without end-string.</paragraph></system_message><paragraph>Notez qu'aucun traitement supplémentaire n'est apporté entre deux -doubles apostrophes inversées -- les astérisques, comme dans "`` * <problematic id="id7" refid="id6">``</problematic>", -sont donc conservées en l'état.</paragraph><system_message backrefs="id7" id="id6" level="2" line="140" source="/home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/frEntier.rst" type="WARNING"><paragraph>Inline literal start-string without end-string.</paragraph></system_message><paragraph>Si vous souhaitez utiliser un de ces caractères "spéciaux" dans -le texte, il n'y a généralement pas de problème -- reStructuredText -est assez malin. -Par exemple, cet astérisque <literal>*</literal> est traité correctement. Si vous -souhaitez par contre <literal>*``entourer un texte par des astérisques``*</literal> -<strong>sans</strong> qu'il soit en italique, il est nécessaire d'indiquer que -l'astérisque ne doit pas être interprété. Pour cela il suffit de placer -une barre oblique inversée juste avant lui, comme ça "<literal>\*</literal>" (<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#escaping">quickref</reference>), ou -en l'entourant de doubles apostrophes inversées (litteral), comme cela</paragraph><literal_block xml:space="preserve">``\*``</literal_block><paragraph>(<literal>\*</literal> n'est pas implanté dans le JRST seul les `` fonctionnent)</paragraph><target anonymous="1" id="id8" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#escaping"/></section><section id="listes" name="listes"><title auto="1" refid="id32"><generated class="sectnum">2.3 </generated>Listes</title><paragraph>Il y a trois types de listes: <strong>numérotées</strong>, <strong>avec puces</strong> et -de <strong>définitions</strong>. Dans chaque cas, nous pouvons avoir autant -de paragraphes, sous-listes, etc. que l'on souhaite, tant que -le décalage à gauche est aligné sur la première ligne.</paragraph><paragraph>Les listes doivent toujours démarrer un nouveau paragraphe --- c'est à dire qu'il doit y avoir un saut de ligne juste avant.</paragraph><paragraph>Listes <strong>numérotées</strong> (par des nombres, lettres, chiffres romains; -<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#enumerated-lists">quickref</reference>)</paragraph><target anonymous="1" id="id9" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#enumerated-lists"/><block_quote><paragraph>En démarrant une ligne avec un numéro ou une lettre suivie d'un -point ".", une parenthèse droite ")" ou entouré par des parenthèses --- comme vous préférez. Toutes ces formes sont reconnues:</paragraph><literal_block xml:space="preserve">1. nombres - -A. Lettres en majuscule - qui continue sur plusieurs ligne - - avec deux paragraphes et tout ! - -a. lettres minuscules - - 3. avec une sous-liste qui démarre à un nombre différent - 4. faites attention à garder une séquence de nombre correcte ! - -I. majuscules en chiffres romains - -i. minuscules en chiffres romains - -(1) des nombres à nouveau - -1) et encore</literal_block><paragraph>Le résultat (note : Tous les styles de listes ne sont pas toujours -supportés par tous les navigateurs, vous ne verrez donc pas forcément -les effets complets) :</paragraph><block_quote><enumerated_list enumtype="arabic" prefix="" suffix="."><list_item><paragraph>nombres</paragraph></list_item></enumerated_list><enumerated_list enumtype="upperalpha" prefix="" suffix="."><list_item><paragraph>Lettres en majuscule -qui continue sur plusieurs ligne</paragraph><paragraph>avec deux paragraphes et tout !</paragraph></list_item></enumerated_list><enumerated_list enumtype="loweralpha" prefix="" suffix="."><list_item><paragraph>lettres minuscules</paragraph><enumerated_list enumtype="arabic" prefix="" start="3" suffix="."><list_item><paragraph>avec une sous-liste qui démarre à un nombre différent</paragraph></list_item><list_item><paragraph>faites attention à garder une séquence de nombre correcte !</paragraph></list_item></enumerated_list></list_item></enumerated_list><enumerated_list enumtype="upperroman" prefix="" suffix="."><list_item><paragraph>majuscules en chiffres romains</paragraph></list_item></enumerated_list><enumerated_list enumtype="lowerroman" prefix="" suffix="."><list_item><paragraph>minuscules en chiffres romains</paragraph></list_item></enumerated_list><enumerated_list enumtype="arabic" prefix="(" suffix=")"><list_item><paragraph>des nombres à nouveau</paragraph></list_item></enumerated_list><enumerated_list enumtype="arabic" prefix="" suffix=")"><list_item><paragraph>et encore</paragraph></list_item></enumerated_list></block_quote></block_quote><paragraph>Listes <strong>à puces</strong> (<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#bullet-lists">quickref</reference>)</paragraph><target anonymous="1" id="id10" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#bullet-lists"/><block_quote><paragraph>De la même manière que pour les listes numérotées, il faut démarrer -la première ligne avec une puce -- soit "-", "+" ou "*":</paragraph><literal_block xml:space="preserve">* une puce "*" - - - une sous-liste avec "-" - - + à nouveau une sous-liste - - - une autre option</literal_block><paragraph>Le résultat:</paragraph><block_quote><bullet_list bullet="*"><list_item><paragraph>une puce "*"</paragraph><bullet_list bullet="-"><list_item><paragraph>une sous-liste avec "-"</paragraph><block_quote><bullet_list bullet="+"><list_item><paragraph>à nouveau une sous-liste</paragraph></list_item></bullet_list></block_quote></list_item><list_item><paragraph>une autre option</paragraph></list_item></bullet_list></list_item></bullet_list></block_quote></block_quote><paragraph>Les listes de <strong>définitions</strong> (<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#definition-lists">quickref</reference>)</paragraph><target anonymous="1" id="id11" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#definition-lists"/><block_quote><paragraph>Comme les deux autres, les listes de définitions consistent en un -terme et la définition de ce terme. Le format est le suivant:</paragraph><literal_block xml:space="preserve">Quoi - Les listes de définitions associent un terme avec une définition. - -*Comment* - Le terme est une phrase d'une ligne, et la définition est d'un - ou plusieurs paragraphes ou éléments, décalés par rapport au terme. - Les lignes vides ne sont pas autorisées entre le terme et la définition.</literal_block><paragraph>Le résultat:</paragraph><block_quote><definition_list><definition_list_item><term>Quoi</term><definition><paragraph>Les listes de définitions associent un terme avec une définition.</paragraph></definition></definition_list_item><definition_list_item><term><emphasis>Comment</emphasis></term><definition><paragraph>Le terme est une phrase d'une ligne, et la définition est d'un -ou plusieurs paragraphes ou éléments, décalés par rapport au terme. -Les lignes vides ne sont pas autorisées entre le terme et la définition.</paragraph></definition></definition_list_item></definition_list></block_quote></block_quote></section><section id="pr-formatage" name="préformatage"><title auto="1" refid="id33"><generated class="sectnum">2.4 </generated>Préformatage</title><paragraph>(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#literal-blocks">quickref</reference>)</paragraph><target anonymous="1" id="id12" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#literal-blocks"/><paragraph>Pour inclure un texte préformaté sans traitement -il suffit de terminer le paragraphe par "<literal>::</literal>". Le texte préformaté est -terminé lorsqu'une ligne retombe au niveau du décalage précédent. Par exemple:</paragraph><literal_block xml:space="preserve">Un exemple:: - - Espaces, nouvelles lignes, lignes vides, et toutes sortes de marqueurs - (comme *ceci* ou \cela) sont préservés dans les bloc préformatés. - - Regardez ici, je suis descendu d'un niveau. - (mais pas assez) - -Fin de l'exemple</literal_block><paragraph>Le résultat:</paragraph><block_quote><paragraph>Un exemple:</paragraph><literal_block xml:space="preserve"> Espaces, nouvelles lignes, lignes vides, et toutes sortes de marqueurs - (comme *ceci* ou \cela) sont préservés dans les bloc préformatés. - -Regardez ici, je suis descendu d'un niveau. -(mais pas assez)</literal_block><paragraph>Fin de l'exemple</paragraph></block_quote><paragraph>Notez que si le paragraphe contient seulement "<literal>::</literal>", il est ignoré.</paragraph><block_quote><literal_block xml:space="preserve">Ceci est un texte préformaté, -le paragraphe "::" est ignoré.</literal_block></block_quote></section><section id="sections" name="sections"><title auto="1" refid="id34"><generated class="sectnum">2.5 </generated>Sections</title><paragraph>(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#section-structure">quickref</reference>)</paragraph><target anonymous="1" id="id13" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#section-structure"/><paragraph>Pour diviser un texte en plusieurs sections, nous utilisons des -<strong>en-têtes de section</strong>. C'est à dire une seule ligne de texte (d'un -ou plusieurs mots) avec un ornement : juste en dessous et éventuellement -dessus aussi, avec des tirets "<literal>-----</literal>", égal "<literal>=====</literal>", tildes -"<literal>~~~~~</literal>" ou n'importe quel de ces caractères <literal>= - ` : ' " ~ ^ _ * + # < ></literal> -qui vous semble convenir. Un ornement simplement en dessous n'a pas la -même signification qu'un ornement dessus-dessous avec le même caractère. -Les ornements doivent avoir au moins la taille du texte. Soyez cohérent, -les ornements identiques sont censés être du même niveau:</paragraph><literal_block xml:space="preserve">Chapitre 1 -========== - -Section 1.1 ------------ - -Sous-section 1.1.1 -~~~~~~~~~~~~~~~~~~ - -Section 1.2 ------------ - -Chapitre 2 -==========</literal_block><paragraph>Le résultat de cette structure, sous la forme pseudo-XML:</paragraph><literal_block xml:space="preserve"><section> - <title> - Chapitre 1 - <section> - <title> - Section 1.1 - <section> - <title> - Sous-section 1.1.1 - <section> - <title> - Section 1.2 -<section> - <title> - Chapitre 2</literal_block><paragraph>(Pseudo-XML utilise une indentation et n'as pas de balises finale. Il -n'est pas possible de montrer le résultat, comme dans les autres exemples, -du fait que les sections ne peuvent être utilisées à l'intérieur d'un -paragraphe décalé. Pour un exemple concret, comparez la structure de -ce document avec le résultat.)</paragraph><paragraph>Notez que les en-têtes de section sont utilisable comme cible de liens, -simplement en utilisant leur nom. Pour créer un lien sur la section <reference name="Listes" refid="listes">Listes</reference>, -j'écris "<literal>Listes_</literal>". Si le titre comporte des espaces, il est nécessaire -d'utiliser les doubles apostrophes inversées "<literal>`Styles de texte`_</literal>".</paragraph><paragraph>Pour indiquer le titre du document, utilisez un style d'ornement unique -en début de document. Pour indiquer un sous-titre de document, utilisez -un autre ornement unique juste après le titre. -Par exemple:</paragraph><literal_block xml:space="preserve">================= -Titre du document -================= ----------- -Sous-titre ----------- - -Titre de la section -=================== - -...</literal_block><paragraph>Notez que "Titre du document" et "Titre de la section" utilisent le signe -égal, mais sont différents et sans relation. Le texte et l'ornement peuvent -être de la même taille pour des questions d'esthétisme.</paragraph></section><section id="images" name="images"><title auto="1" refid="id35"><generated class="sectnum">2.6 </generated>Images</title><paragraph>(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#directives">quickref</reference>)</paragraph><target anonymous="1" id="id14" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#directives"/><paragraph>Pour inclure une image dans votre document, vous devez utiliser la <reference anonymous="1" name="directive" refuri="http://docutils.sourceforge.net/spec/rst/directives.html">directive</reference> -<literal>image</literal>. -Par exemple:</paragraph><literal_block xml:space="preserve">.. image:: biohazard.png</literal_block><paragraph>Le résultat:</paragraph><image uri="biohazard.png"/><paragraph>La partie <literal>images/biohazard.png</literal> indique le chemin d'accès au fichier -de l'image qui doit apparaître. Il n'y a pas de restriction sur l'image -(format, taille etc). Si l'image doit apparaître en HTML et que vous -souhaitez lui ajouter des informations:</paragraph><literal_block xml:space="preserve">.. image:: biohazard.png - :height: 100 - :width: 200 - :scale: 50 - :alt: texte alternatif</literal_block><paragraph>Consultez la <reference anonymous="1" name="documentation" refuri="http://docutils.sourceforge.net/spec/rst/directives.html#images">documentation</reference> complète de la directive image pour plus d'informations.</paragraph><target anonymous="1" id="id15" refuri="http://docutils.sourceforge.net/spec/rst/directives.html"/><target anonymous="1" id="id16" refuri="http://docutils.sourceforge.net/spec/rst/directives.html#images"/></section><section id="et-ensuite" name="et ensuite ?"><title auto="1" refid="id36"><generated class="sectnum">2.7 </generated>Et ensuite ?</title><paragraph>Cette introduction montre les possibilités les plus courantes de reStructuredText, -mais il y en a bien d'autres à explorer. Le manuel de référence utilisateur -'Quick reStructuredText`_ est recommandé pour aller plus loin. Pour les détails complets -consultez <reference name="reStructuredText Markup Specification" refuri="http://docutils.sourceforge.net/spec/rst/reStructuredText.html">reStructuredText Markup Specification</reference> <footnote_reference auto="1" id="id17" refid="id18">1</footnote_reference>.</paragraph><footnote auto="1" backrefs="id17" id="id18" name="1"><label>1</label><paragraph>Si ce lien relatif ne fonctionne pas, consultez le document principal: -<reference refuri="http://docutils.sourceforge.net/spec/rst/reStructuredText.html">http://docutils.sourceforge.net/spec/rst/reStructuredText.html</reference>.</paragraph></footnote><target id="restructuredtext-markup-specification" name="restructuredtext markup specification" refuri="http://docutils.sourceforge.net/spec/rst/reStructuredText.html"/><target id="poster-un-message" name="poster un message" refuri="mailto:docutils-users@lists.sourceforge.net"/><target id="docutils-users-mailing-list" name="docutils-users mailing list" refuri="http://lists.sourceforge.net/lists/listinfo/docutils-users"/><target id="docutils-project-web-site" name="docutils project web site" refuri="http://docutils.sourceforge.net/"/></section></section><section id="le-xsl-extensible-stylesheets-language" name="le xsl (extensible stylesheets language)"><title auto="1" refid="id37"><generated class="sectnum">3 </generated>Le XSL (Extensible Stylesheets Language)</title><section dupname="présentation" id="id19"><title auto="1" refid="id38"><generated class="sectnum">3.1 </generated>Présentation</title><paragraph>XML est un langage de structuration des données, et non de représentation des données. Ainsi XSL -(eXtensible StyleSheet Language) est un langage recommandé par le W3C pour effectuer la représentation -des données de documents XML. XSL est lui-même défini avec le formalisme XML, cela signifie qu'une -feuille de style XSL est un document XML bien formé.</paragraph><paragraph>XSL est un langage permettant de définir des feuilles de style pour les documents XML au même titre que -les CSS (Cascading StyleSheets) pour le langage HTML ou bien DSSSL (Document Style Semantics and -Specification Language) pour le SGML. XSL est d'ailleurs inspiré de DSSSL dont il reprend beaucoup -de fonctionnalités et est compatible avec les CSS (il s'agit d'un sur-ensemble des CSS).</paragraph><paragraph>Toutefois, contrairement aux CSS, XSL permet aussi de retraiter un document XML afin d'en modifier totalement -sa structure, ce qui permet à partir d'un document XML d'être capable de générer d'autres types de documents -(PostScript, HTML, Tex, RTF, ...) ou bien un fichier XML de structure différente.</paragraph><paragraph>Ainsi la structuration des données (définie par XML) et leur représentation (définie par un langage tel que -XSL) sont séparées. Cela signifie qu'il est possible à partir d'un document XML de créer des documents -utilisant différentes représentations (HTML pour créer des pages web, WML pour les mobiles WAP, ...).</paragraph><paragraph><image alt="presentationxsl" uri="presentationXSL.png"/></paragraph></section><section id="structure-d-un-document-xsl" name="structure d'un document xsl"><title auto="1" refid="id39"><generated class="sectnum">3.2 </generated>Structure d'un document XSL</title><paragraph>Un document XSL étant un document XML, il commence obligatoirement par la balise suivante:</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?></literal_block><paragraph>D'autre part, toute feuille de style XSL est comprise entre les balises <xsl:stylesheet ...> et </xsl:stylesheet>.</paragraph><paragraph>La balise xsl:stylesheet encapsule des balises xsl:template définissant les transformations à faire subir à certains -éléments du document XML.</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet -xmlns:xsl="http://www.w3.org/TR/WD-xsl" -xmlns="http://www.w3.org/TR/REC-html40" -result-ns=""> - <xsl:template ... > - <!-- traitements à effectuer --> - </xsl:template > -</xsl:stylesheet></literal_block></section><section id="association-d-une-feuille-xsl-un-document-xml" name="association d'une feuille xsl à un document xml"><title auto="1" refid="id40"><generated class="sectnum">3.3 </generated>Association d'une feuille XSL à un document XML</title><paragraph>Une feuille de style XSL (enregistré dans un fichier dont l'extension est .xsl) peut être liée à un document -XML (de telle manière à ce que le document XML utilise la feuille XSL) en insérant la balise suivante au début -du document XML:</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?> -<?xml-stylesheet href="fichier.xsl" type="text/xsl"?></literal_block></section><section id="les-template-rules-r-gles-de-gabarit" name="les template rules (règles de gabarit)"><title auto="1" refid="id41"><generated class="sectnum">3.4 </generated>Les template rules (règles de gabarit)</title><paragraph>Les template rules sont des balises XSL permettant de définir des opérations à réaliser sur certains éléments -du document XML utilisant la page XSL, c'est-à-dire généralement de transformer un tag XML en au moins un tag -HTML (généralement plusieurs).</paragraph><paragraph>Ainsi le tag XML suivant:</paragraph><literal_block xml:space="preserve"><personne> - <nom>Pillou</nom> - <prenom>Jean-François</prenom> -</personne> -<personne> - <nom>VanHaute</nom> - <prenom>Nico</prenom> -</personne> -<personne> - <nom>Andrieu</nom> - <prenom>Seb</prenom> -</personne></literal_block><paragraph>pourra être transformé en les tags HTML suivants:</paragraph><literal_block xml:space="preserve"><ul> - <li>Pillou - Jean-François</li> - <li>VanHaute - Nico</li> - <li>Andrieu - Seb</li> -</ul></literal_block><paragraph>L'attribut "match" de la balise <xsl:template> permet de définir (grâce à la notation XPath) le ou les éléments -du document XML sur lesquels s'applique la transformation.</paragraph><paragraph>La notation Xpath permet de définir des patterns, c'est-à-dire des chaînes de caractères permettant de repérer -un noeud dans le document XML. Les principaux patterns sont :</paragraph><table><tgroup cols="3"><colspec colwidth="7"/><colspec colwidth="13"/><colspec colwidth="65"/><thead><row><entry><paragraph>Pattern</paragraph></entry><entry><paragraph>Exemple</paragraph></entry><entry><paragraph>Signification</paragraph></entry></row></thead><tbody><row><entry><paragraph><literal>|</literal></paragraph></entry><entry><paragraph>Gauche|Milieu</paragraph></entry><entry><paragraph>Indique une alternative (un noeud ou bien l'autre (ou les deux))</paragraph></entry></row><row><entry><paragraph>/</paragraph></entry><entry><paragraph>personne/nom</paragraph></entry><entry><paragraph>Chemin d'accès aux éléments (personne/bras/gauche)</paragraph></entry></row><row><entry><bullet_list bullet="*"><list_item/></bullet_list></entry><entry><bullet_list bullet="*"><list_item/></bullet_list></entry><entry><paragraph>Motif "joker" désignant n'importe quel élément</paragraph></entry></row><row><entry><paragraph>//</paragraph></entry><entry><paragraph>//personne</paragraph></entry><entry><paragraph>Indique tous les descendants d'un noeud</paragraph></entry></row><row><entry><paragraph>.</paragraph></entry><entry><paragraph>.</paragraph></entry><entry><paragraph>Caractérise le noeud courant</paragraph></entry></row><row><entry><paragraph><literal>..</literal></paragraph></entry><entry><paragraph><literal>..</literal></paragraph></entry><entry><paragraph>Désigne le noeud parent</paragraph></entry></row><row><entry><paragraph>@</paragraph></entry><entry><paragraph>@valeur</paragraph></entry><entry><paragraph>Indique un attribut caractéristique</paragraph></entry></row></tbody></tgroup></table><paragraph>La transformation peut être réalisée :</paragraph><bullet_list bullet="-"><list_item><paragraph>soit par ajout de texte,</paragraph></list_item><list_item><paragraph>soit en définissant des éléments de transformation, c'est-à-dire des éléments permettant de définir -des règles de transformation à appliquer aux éléments sélectionnés par l'attribut match</paragraph></list_item></bullet_list><paragraph>Voici un exemple de feuille XSL permettant d'effectuer la transformation XML vers HTML décrite ci-dessus:</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet -xmlns:xsl="http://www.w3.org/TR/WD-xsl" -xmlns="http://www.w3.org/TR/REC-html40" -result-ns=""> - <xsl:template match="/"> - <HTML> - <HEAD> - <TITLE>Titre de la page</TITLE> - </HEAD> - <BODY BGCOLOR="#FFFFFF"> - <xsl:apply-templates/> - </BODY> - </HTML> - </xsl:template > - <xsl:template match="personne" > - <ul> - <li> - <xsl:value-of select="nom"/> - - - <xsl:value-of select="prenom"/> - </li> - </ul> - </xsl:template > -</xsl:stylesheet></literal_block><paragraph>Voici la signification de cette feuille XSL :</paragraph><bullet_list bullet="*"><list_item><paragraph>Le premier tag <xsl:template> permet d'appliquer une transformation à l'ensemble du document (la valeur -"/" de l'attribut match indique l'élément racine du document XML). Ce tag contient des balises HTML qui -seront transmises dans l'arbre résultat.</paragraph></list_item><list_item><paragraph>L'élément <xsl:apply-templates/> indique le traitement de tous les enfants directs de la racine.</paragraph></list_item><list_item><paragraph>La balise <xsl:template match="personne"> permet d'aller traiter les éléments de type personne.</paragraph></list_item><list_item><paragraph>Enfin les deux éléments <xsl:value-of select="nom"/> et <xsl:value-of select="prenom"/> permettent de -recuperer les valeurs des balises nom et prenom.</paragraph></list_item></bullet_list></section><section id="r-f-rences" name="références"><title auto="1" refid="id42"><generated class="sectnum">3.5 </generated>Références</title><bullet_list bullet="-"><list_item><paragraph>Article : <reference refuri="http://www.commentcamarche.net/xml/xmlxsl.php3">http://www.commentcamarche.net/xml/xmlxsl.php3</reference></paragraph></list_item><list_item><paragraph>Schéma : <reference refuri="http://fr.wikipedia.org/wiki/Extended_stylesheet_language_transformations">http://fr.wikipedia.org/wiki/Extended_stylesheet_language_transformations</reference></paragraph></list_item></bullet_list><substitution_definition name="presentationxsl"><image alt="presentationxsl" uri="presentationXSL.png"/></substitution_definition></section></section><section id="documentation-d-veloppeur" name="documentation développeur"><title auto="1" refid="id43"><generated class="sectnum">4 </generated>Documentation développeur</title><section id="le-diagramme-de-class" name="le diagramme de class"><title auto="1" refid="id44"><generated class="sectnum">4.1 </generated>Le diagramme de Class</title><paragraph><image alt="classDiagramme" uri="DiagrammeClass.png"/></paragraph><definition_list><definition_list_item><term>La Class <strong>AdvancedReader</strong> à pour fonction de faciliter la lecture du fichier RST grâce à différentes méthodes :</term><definition><bullet_list bullet="-"><list_item><paragraph>String readLine() : renvoie une ligne</paragraph></list_item><list_item><paragraph>String[] readLines(int nombresLigne) : renvoie un certain nombre de lignes</paragraph></list_item><list_item><paragraph>Stringn[] readWhile(Pattern p) : renvoie les lignes tant qu'elles correspondent au pattern</paragraph></list_item></bullet_list></definition></definition_list_item></definition_list><paragraph>...</paragraph><paragraph>La Class <strong>JRSTLexer</strong> utilise <strong>AdvancedReader</strong> pour construire un fichier XML, il parcours l'ensemble du document pour isoler les types de données, leurs paramètres et leurs contenus, donc rassembler toutes les informations utiles à la mise en forme du XML final. Il va commencer par l'entête du document (peekHeader(), peekDocInfo()) pour ensuite s'intéresser au corps (peekBody()).</paragraph><paragraph>La Class <strong>JRSTReader</strong> utilise <strong>JRSTLexer</strong>, il interprète le XML qui lui est renvoyé pour construire le XML final. Celui-ci est conforme à la DTD définie par <reference name="DocUtils" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html">DocUtils</reference>. Cette Class à parfois besoin de s'appeler elle même lorsque une partie du document doit être interprétée indépendamment du reste. Par exemple, s'il y a une liste dans une case d'un tableau, l'on extrait les informations de la case et on les interprètes, le contenu d'une admoniton (une note) doit lui aussi être considéré comme un document indépendant. Lorsque la génération est terminée, la Class compose le sommaire (composeContent()) puis s'occupe de toutes les spécificités « inline » (inline()), comme par exemple les mots en italique ou gras, les références, les footnotes... Tout ce qui peut apparaître à l'intérieur d'une ligne.</paragraph><paragraph>La Class <strong>reStructuredText</strong> référence toutes les variables nécessaires à la génération du XML final.</paragraph><paragraph>La Class <strong>JRST</strong> contient la méthode main(), elle gère les options, la lecture et l'écriture des fichiers. Elle lit le document, le parse grâce à la class <strong>JRSTReader</strong> puis applique le XSL désiré (si besoin) grâce à la class <strong>JRSTGenerator</strong>.</paragraph></section><section id="la-g-n-ration" name="la génération"><title auto="1" refid="id45"><generated class="sectnum">4.2 </generated>La génération</title><paragraph><image alt="diagrammegeneration" uri="DiagrammeGeneration.png"/></paragraph><paragraph>Référence :</paragraph><bullet_list bullet="-"><list_item><paragraph>xml2rst.xsl (convertion de xml de docutils vers rst) : <reference refuri="http://www.merten-home.de/FreeSoftware/xml2rst">http://www.merten-home.de/FreeSoftware/xml2rst</reference></paragraph></list_item><list_item><paragraph>dn2dbk.xsl (convertion de xml de docutils vers docbook) : <reference refuri="http://membres.lycos.fr/ebellot/dn2dbk">http://membres.lycos.fr/ebellot/dn2dbk</reference></paragraph></list_item><list_item><paragraph>les xsl de nwalsh (convertion de docbook vers FO et xhtml) : <reference refuri="http://nwalsh.com">http://nwalsh.com</reference></paragraph></list_item><list_item><paragraph>XMLmind (convertion de FO vers ODT et RTF) : <reference refuri="http://www.xmlmind.com/foconverter/what_is_xfc.html">http://www.xmlmind.com/foconverter/what_is_xfc.html</reference></paragraph></list_item><list_item><paragraph>FOP (convertion de FO vers PDF) : <reference refuri="http://xmlgraphics.apache.org/fop">http://xmlgraphics.apache.org/fop</reference></paragraph></list_item></bullet_list></section><section id="exemple-d-utilisation" name="exemple d'utilisation"><title auto="1" refid="id46"><generated class="sectnum">4.3 </generated>Exemple d'utilisation</title><paragraph>L'on souhaite convertir le document rst (text.rst) suivant en html (text.html) :</paragraph><literal_block xml:space="preserve">===== -Titre -===== - -:Author: Letellier Sylvain - -.. Attention:: texte à être réinterprété comme un fichier rst indépendant</literal_block><paragraph>On utilise donc la commande suivante:</paragraph><literal_block xml:space="preserve">JRST -t html -o text.html text.rst</literal_block><paragraph>Ce diagramme de séquence décrit le fonctionnement du parseur tout au long de la génération :</paragraph><paragraph><image alt="sequanceDiagramme" uri="DiagrammeSequance.png"/></paragraph><paragraph>La Classe <strong>JRSTGenerator</strong>, grâce au fichier XSL rst2xhtml.xsl, renvoie le fichier html suivant:</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?> -<html xmlns="http://www.w3.org/TR/xhtml1/strict"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> - <title>Titre</title> - </head> - <body> - <h1>Titre</h1> - <table class="docinfo" frame="void" rules="none"> - <col class="docinfo-name"/> - <col class="docinfo-content"/> - <tbody valign="top"> - <tr> - <th class="docpatterninfo-name">author :</th> - <td class="docinfo-content">Letellier Sylvain</td> - </tr> - </tbody> - </table> - <div class="attention"> - <p class="title">attention :</p> - <p class="body"> - <p>texte à être réinterprété comme un fichier rst indépendant</p> - </p> - </div> - </body> -</html></literal_block><paragraph>Qui affiche la page (un CSS à été ajouté pour la mise en forme) :</paragraph><topic><title>Titre</title><field_list><field><field_name>Author</field_name><field_body><paragraph>Letellier Sylvain</paragraph></field_body></field></field_list><system_message level="2" line="708" source="/home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/frEntier.rst" type="WARNING"><paragraph>Field list ends without a blank line; unexpected unindent.</paragraph></system_message><attention><paragraph>texte à être réinterprété comme un fichier rst indépendant</paragraph></attention></topic><target id="docutils" name="docutils" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html"/><substitution_definition name="diagrammegeneration"><image alt="diagrammegeneration" uri="DiagrammeGeneration.png"/></substitution_definition><substitution_definition name="classDiagramme"><image alt="classDiagramme" uri="DiagrammeClass.png"/></substitution_definition><substitution_definition name="sequanceDiagramme"><image alt="sequanceDiagramme" uri="DiagrammeSequance.png"/></substitution_definition></section></section><section id="fonctionnalit-s-propos-es" name="fonctionnalités proposées"><title auto="1" refid="id47"><generated class="sectnum">5 </generated>Fonctionnalités proposées</title><paragraph>La DTD de Docutils : <reference refuri="http://docutils.sourceforge.net/docs/ref/doctree.html">http://docutils.sourceforge.net/docs/ref/doctree.html</reference></paragraph><section id="fonctionnalit-s-implant-es" name="fonctionnalités implantées"><title auto="1" refid="id48"><generated class="sectnum">5.1 </generated>Fonctionnalités implantées</title><section id="element-racine" name="element racine"><title auto="1" refid="id49"><generated class="sectnum">5.1.1 </generated>Element racine</title><bullet_list bullet="-"><list_item><paragraph><reference name="document" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#document">document</reference></paragraph></list_item></bullet_list></section><section id="elements-titre" name="elements titre"><title auto="1" refid="id50"><generated class="sectnum">5.1.2 </generated>Elements titre</title><bullet_list bullet="-"><list_item><paragraph><reference name="subtitle" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#subtitle">subtitle</reference></paragraph></list_item><list_item><paragraph><reference name="title" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#title">title</reference></paragraph></list_item></bullet_list></section><section id="elements-bibliographiques" name="elements bibliographiques"><title auto="1" refid="id51"><generated class="sectnum">5.1.3 </generated>Elements bibliographiques</title><bullet_list bullet="-"><list_item><paragraph><reference name="docinfo" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#docinfo">docinfo</reference></paragraph></list_item><list_item><paragraph><reference name="author" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#author">author</reference></paragraph></list_item><list_item><paragraph><reference name="authors" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#authors">authors</reference></paragraph></list_item><list_item><paragraph><reference name="organization" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#organization">organization</reference></paragraph></list_item><list_item><paragraph><reference name="address" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#address">address</reference></paragraph></list_item><list_item><paragraph><reference name="contact" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#contact">contact</reference></paragraph></list_item><list_item><paragraph><reference name="version" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#version">version</reference></paragraph></list_item><list_item><paragraph><reference name="revision" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#revision">revision</reference></paragraph></list_item><list_item><paragraph><reference name="status" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#status">status</reference></paragraph></list_item><list_item><paragraph><reference name="date" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#date">date</reference></paragraph></list_item><list_item><paragraph><reference name="copyright" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#copyright">copyright</reference></paragraph></list_item></bullet_list></section><section id="elements-de-d-coration" name="elements de décoration"><title auto="1" refid="id52"><generated class="sectnum">5.1.4 </generated>Elements de décoration</title><bullet_list bullet="-"><list_item><paragraph><reference name="decoration" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#decoration">decoration</reference></paragraph></list_item><list_item><paragraph><reference name="footer" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footer">footer</reference></paragraph></list_item><list_item><paragraph><reference name="header" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#header">header</reference></paragraph></list_item></bullet_list></section><section id="elements-structurels" name="elements structurels"><title auto="1" refid="id53"><generated class="sectnum">5.1.5 </generated>Elements structurels</title><bullet_list bullet="-"><list_item><paragraph><reference name="section" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#section">section</reference></paragraph></list_item><list_item><paragraph><reference name="topic" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#topic">topic</reference></paragraph></list_item><list_item><paragraph><reference name="sidebar" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#sidebar">sidebar</reference></paragraph></list_item><list_item><paragraph><reference name="transition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#transition">transition</reference></paragraph></list_item></bullet_list></section><section id="elements-du-corps" name="elements du corps"><title auto="1" refid="id54"><generated class="sectnum">5.1.6 </generated>Elements du corps</title><bullet_list bullet="-"><list_item><paragraph><reference name="admonition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#admonition">admonition</reference></paragraph></list_item><list_item><paragraph><reference name="attention" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#attention">attention</reference></paragraph></list_item><list_item><paragraph><reference name="block_quote" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#block-quote">block_quote</reference></paragraph></list_item><list_item><paragraph><reference name="bullet_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#bullet-list">bullet_list</reference></paragraph></list_item><list_item><paragraph><reference name="caution" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#caution">caution</reference></paragraph></list_item><list_item><paragraph><reference name="classifier" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#classifier">classifier</reference></paragraph></list_item><list_item><paragraph><reference name="danger" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#danger">danger</reference></paragraph></list_item><list_item><paragraph><reference name="definition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition">definition</reference></paragraph></list_item><list_item><paragraph><reference name="definition_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list">definition_list</reference></paragraph></list_item><list_item><paragraph><reference name="definition_list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list-item">definition_list_item</reference></paragraph></list_item><list_item><paragraph><reference name="description" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#description">description</reference></paragraph></list_item><list_item><paragraph><reference name="doctest_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#doctest-block">doctest_block</reference></paragraph></list_item><list_item><paragraph><reference name="enumerated_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#enumerated-list">enumerated_list</reference></paragraph></list_item><list_item><paragraph><reference name="error" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#error">error</reference></paragraph></list_item><list_item><paragraph><reference name="field" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field">field</reference></paragraph></list_item><list_item><paragraph><reference name="field_body" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-body">field_body</reference></paragraph></list_item><list_item><paragraph><reference name="field_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-list">field_list</reference></paragraph></list_item><list_item><paragraph><reference name="field_name" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-name">field_name</reference></paragraph></list_item><list_item><paragraph><reference name="footnote" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footnote">footnote</reference></paragraph></list_item><list_item><paragraph><reference name="hint" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#hint">hint</reference></paragraph></list_item><list_item><paragraph><reference name="image" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#image">image</reference></paragraph></list_item><list_item><paragraph><reference name="important" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#important">important</reference></paragraph></list_item><list_item><paragraph><reference name="line" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#line">line</reference></paragraph></list_item><list_item><paragraph><reference name="line_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#line-block">line_block</reference></paragraph></list_item><list_item><paragraph><reference name="list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#list-item">list_item</reference></paragraph></list_item><list_item><paragraph><reference name="literal_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#literal-block">literal_block</reference></paragraph></list_item><list_item><paragraph><reference name="note" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#note">note</reference></paragraph></list_item><list_item><paragraph><reference name="option" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option">option</reference></paragraph></list_item><list_item><paragraph><reference name="option_argument" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-argument">option_argument</reference></paragraph></list_item><list_item><paragraph><reference name="option_group" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-group">option_group</reference></paragraph></list_item><list_item><paragraph><reference name="option_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-list">option_list</reference></paragraph></list_item><list_item><paragraph><reference name="option_list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-list-item">option_list_item</reference></paragraph></list_item><list_item><paragraph><reference name="option_string" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-string">option_string</reference></paragraph></list_item><list_item><paragraph><reference name="paragraph" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#paragraph">paragraph</reference></paragraph></list_item><list_item><paragraph><reference name="term" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#term">term</reference></paragraph></list_item><list_item><paragraph><reference name="tip" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tip">tip</reference></paragraph></list_item><list_item><paragraph><reference name="warning" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#warning">warning</reference></paragraph></list_item></bullet_list></section><section id="elements-des-tableaux" name="elements des tableaux"><title auto="1" refid="id55"><generated class="sectnum">5.1.7 </generated>Elements des tableaux</title><bullet_list bullet="-"><list_item><paragraph><reference name="table" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#table">table</reference></paragraph></list_item><list_item><paragraph><reference name="tbody" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tbody">tbody</reference></paragraph></list_item><list_item><paragraph><reference name="entry" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#entry">entry</reference></paragraph></list_item><list_item><paragraph><reference name="row" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#row">row</reference></paragraph></list_item><list_item><paragraph><reference name="colspec" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#colspec">colspec</reference></paragraph></list_item><list_item><paragraph><reference name="thead" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#thead">thead</reference></paragraph></list_item><list_item><paragraph><reference name="tgroup" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tgroup">tgroup</reference></paragraph></list_item></bullet_list></section><section id="elements-de-la-ligne" name="elements de la ligne"><title auto="1" refid="id56"><generated class="sectnum">5.1.8 </generated>Elements de la ligne</title><bullet_list bullet="-"><list_item><paragraph><reference name="emphasis" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#emphasis">emphasis</reference></paragraph></list_item><list_item><paragraph><reference name="strong" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#strong">strong</reference></paragraph></list_item><list_item><paragraph><reference name="literal" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#literal">literal</reference></paragraph></list_item><list_item><paragraph><reference name="reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#reference">reference</reference></paragraph></list_item><list_item><paragraph><reference name="footnote_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footnote-reference">footnote_reference</reference></paragraph></list_item></bullet_list></section></section><section id="fonctionnalit-s-non-implant-es" name="fonctionnalités non-implantées"><title auto="1" refid="id57"><generated class="sectnum">5.2 </generated>Fonctionnalités non-implantées</title><bullet_list bullet="-"><list_item><paragraph><reference name="abbreviation" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#abbreviation">abbreviation</reference></paragraph></list_item><list_item><paragraph><reference name="acronym" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#acronym">acronym</reference></paragraph></list_item><list_item><paragraph><reference name="attribution" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#attribution">attribution</reference></paragraph></list_item><list_item><paragraph><reference name="caption" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#caption">caption</reference></paragraph></list_item><list_item><paragraph><reference name="citation" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#citation">citation</reference></paragraph></list_item><list_item><paragraph><reference name="citation_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#citation-reference">citation_reference</reference></paragraph></list_item><list_item><paragraph><reference name="comment" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#comment">comment</reference></paragraph></list_item><list_item><paragraph><reference name="compound" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#compound">compound</reference></paragraph></list_item><list_item><paragraph><reference name="container" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#container">container</reference></paragraph></list_item><list_item><paragraph><reference name="figure" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#figure">figure</reference></paragraph></list_item><list_item><paragraph><reference name="generated" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#generated">generated</reference></paragraph></list_item><list_item><paragraph><reference name="inline" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#inline">inline</reference></paragraph></list_item><list_item><paragraph><reference name="label" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#label">label</reference></paragraph></list_item><list_item><paragraph><reference name="legend" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#legend">legend</reference></paragraph></list_item><list_item><paragraph><reference name="pending" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#pending">pending</reference></paragraph></list_item><list_item><paragraph><reference name="problematic" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#problematic">problematic</reference></paragraph></list_item><list_item><paragraph><reference name="raw" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#raw">raw</reference></paragraph></list_item><list_item><paragraph><reference name="rubric" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#rubric">rubric</reference></paragraph></list_item><list_item><paragraph><reference name="subscript" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#subscript">subscript</reference></paragraph></list_item><list_item><paragraph><reference name="substitution_definition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-definition">substitution_definition</reference></paragraph></list_item><list_item><paragraph><reference name="substitution_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-reference">substitution_reference</reference></paragraph></list_item><list_item><paragraph><reference name="superscript" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#superscript">superscript</reference></paragraph></list_item><list_item><paragraph><reference name="system_message" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#system-message">system_message</reference></paragraph></list_item><list_item><paragraph><reference name="target" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#target">target</reference></paragraph></list_item><list_item><paragraph><reference name="title_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#title-reference">title_reference</reference></paragraph></list_item></bullet_list><target id="abbreviation" name="abbreviation" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#abbreviation"/><target id="acronym" name="acronym" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#acronym"/><target id="address" name="address" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#address"/><target id="admonition" name="admonition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#admonition"/><target id="attention" name="attention" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#attention"/><target id="attribution" name="attribution" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#attribution"/><target id="author" name="author" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#author"/><target id="authors" name="authors" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#authors"/><target id="block-quote" name="block_quote" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#block-quote"/><target id="bullet-list" name="bullet_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#bullet-list"/><target id="caption" name="caption" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#caption"/><target id="caution" name="caution" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#caution"/><target id="citation" name="citation" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#citation"/><target id="citation-reference" name="citation_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#citation-reference"/><target id="classifier" name="classifier" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#classifier"/><target id="colspec" name="colspec" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#colspec"/><target id="comment" name="comment" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#comment"/><target id="compound" name="compound" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#compound"/><target id="contact" name="contact" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#contact"/><target id="container" name="container" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#container"/><target id="copyright" name="copyright" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#copyright"/><target id="danger" name="danger" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#danger"/><target id="date" name="date" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#date"/><target id="decoration" name="decoration" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#decoration"/><target id="definition" name="definition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition"/><target id="definition-list" name="definition_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list"/><target id="definition-list-item" name="definition_list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list-item"/><target id="description" name="description" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#description"/><target id="docinfo" name="docinfo" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#docinfo"/><target id="doctest-block" name="doctest_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#doctest-block"/><target id="document" name="document" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#document"/><target id="emphasis" name="emphasis" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#emphasis"/><target id="entry" name="entry" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#entry"/><target id="enumerated-list" name="enumerated_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#enumerated-list"/><target id="error" name="error" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#error"/><target id="field" name="field" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field"/><target id="field-body" name="field_body" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-body"/><target id="field-list" name="field_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-list"/><target id="field-name" name="field_name" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-name"/><target id="figure" name="figure" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#figure"/><target id="footer" name="footer" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footer"/><target id="footnote" name="footnote" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footnote"/><target id="footnote-reference" name="footnote_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footnote-reference"/><target id="generated" name="generated" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#generated"/><target id="header" name="header" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#header"/><target id="hint" name="hint" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#hint"/><target id="image" name="image" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#image"/><target id="important" name="important" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#important"/><target id="inline" name="inline" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#inline"/><target id="label" name="label" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#label"/><target id="legend" name="legend" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#legend"/><target id="line" name="line" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#line"/><target id="line-block" name="line_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#line-block"/><target id="list-item" name="list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#list-item"/><target id="literal" name="literal" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#literal"/><target id="literal-block" name="literal_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#literal-block"/><target id="note" name="note" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#note"/><target id="option" name="option" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option"/><target id="option-argument" name="option_argument" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-argument"/><target id="option-group" name="option_group" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-group"/><target id="option-list" name="option_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-list"/><target id="option-list-item" name="option_list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-list-item"/><target id="option-string" name="option_string" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-string"/><target id="organization" name="organization" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#organization"/><target id="paragraph" name="paragraph" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#paragraph"/><target id="pending" name="pending" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#pending"/><target id="problematic" name="problematic" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#problematic"/><target id="raw" name="raw" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#raw"/><target id="reference" name="reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#reference"/><target id="revision" name="revision" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#revision"/><target id="row" name="row" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#row"/><target id="rubric" name="rubric" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#rubric"/><target id="section" name="section" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#section"/><target id="sidebar" name="sidebar" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#sidebar"/><target id="status" name="status" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#status"/><target id="strong" name="strong" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#strong"/><target id="subscript" name="subscript" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#subscript"/><target id="substitution-definition" name="substitution_definition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-definition"/><target id="substitution-reference" name="substitution_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-reference"/><target id="subtitle" name="subtitle" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#subtitle"/><target id="superscript" name="superscript" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#superscript"/><target id="system-message" name="system_message" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#system-message"/><target id="table" name="table" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#table"/><target id="target" name="target" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#target"/><target id="tbody" name="tbody" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tbody"/><target id="term" name="term" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#term"/><target id="tgroup" name="tgroup" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tgroup"/><target id="thead" name="thead" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#thead"/><target id="tip" name="tip" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tip"/><target id="title" name="title" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#title"/><target id="title-reference" name="title_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#title-reference"/><target id="topic" name="topic" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#topic"/><target id="transition" name="transition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#transition"/><target id="version" name="version" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#version"/><target id="warning" name="warning" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#warning"/></section></section><section id="les-diff-rentes-librairies-utilis-es" name="les différentes librairies utilisées"><title auto="1" refid="id58"><generated class="sectnum">6 </generated>Les différentes librairies utilisées</title><section dupname="dom4j" id="dom4j"><title auto="1" refid="id59"><generated class="sectnum">6.1 </generated><reference name="dom4j" refuri="http://www.dom4j.org">dom4j</reference></title><paragraph><reference name="Dom4j" refuri="http://www.dom4j.org">Dom4j</reference> est une API Open Source Java permettant de travailler avec XML, XPath et XSLT. Cette bibliothèque est compatible avec les standards DOM, SAX et JAXP.</paragraph></section><section dupname="javax.xml.transform" id="javax-xml-transform"><title auto="1" refid="id60"><generated class="sectnum">6.2 </generated><reference name="javax.xml.transform" refuri="http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/package-summary.html">javax.xml.transform</reference></title><paragraph>Librairie permettant la transformation XSL.</paragraph></section><section dupname="sdoc" id="sdoc"><title auto="1" refid="id61"><generated class="sectnum">6.3 </generated><reference name="SDoc" refuri="http://sdoc.sourceforge.net/wiki/pmwiki.php">SDoc</reference></title><paragraph><reference name="SDoc" refuri="http://sdoc.sourceforge.net/wiki/pmwiki.php">SDoc</reference> fournit des composants Swing qui inclut la coloration syntaxique pour de nombreux langages.</paragraph></section><section dupname="xmlunit" id="xmlunit"><title auto="1" refid="id62"><generated class="sectnum">6.4 </generated><reference name="Xmlunit" refuri="http://xmlunit.sourceforge.net/">Xmlunit</reference></title><paragraph><reference name="Xmlunit" refuri="http://xmlunit.sourceforge.net/">Xmlunit</reference> permet de comparer deux fichiers XML pour mettre en évidences les différences.</paragraph><target id="id20" name="dom4j" refuri="http://www.dom4j.org"/><target id="id21" name="javax.xml.transform" refuri="http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/package-summary.html"/><target id="id22" name="sdoc" refuri="http://sdoc.sourceforge.net/wiki/pmwiki.php"/><target id="id23" name="xmlunit" refuri="http://xmlunit.sourceforge.net/"/></section></section><section id="documentation-externe" name="documentation externe"><title auto="1" refid="id63"><generated class="sectnum">7 </generated>Documentation externe</title><paragraph>Le site de docUtils : <reference refuri="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</reference></paragraph><paragraph>La DTD reStructuredText : <reference refuri="http://docutils.sourceforge.net/docs/ref/doctree.html">http://docutils.sourceforge.net/docs/ref/doctree.html</reference></paragraph><paragraph>Un XSL permettant de convertir le XML en RST : <reference refuri="http://www.merten-home.de/FreeSoftware/xml2rst/">http://www.merten-home.de/FreeSoftware/xml2rst/</reference></paragraph><paragraph>Pour la génération de la javaDoc en RST : <reference refuri="http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/overview.html">http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/overview.html</reference></paragraph><paragraph>... footer:: view <reference anonymous="1" name="code source" refuri="frEntier.rst">code source</reference></paragraph><target anonymous="1" id="id24" refuri="frEntier.rst"/></section></document> \ No newline at end of file Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/definition.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/definition.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/definition.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,14 +0,0 @@ -term 1 - Definition 1. - -term 2 - Definition 2, paragraph 1. - - Definition 2, paragraph 2. - -term 3 : classifier - Definition 3. - -term 4 : classifier one : classifier two - Definition 4. - Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/footnoteTest.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/footnoteTest.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/footnoteTest.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,13 +0,0 @@ -Autonumbered footnotes are -possible, like using [#]_ and [#]_. - -.. [#] This is the first one. -.. [#] This is the second one. - -They may be assigned 'autonumber -labels' - for instance, -[#fourth]_ and [#third]_. - -.. [#third] a.k.a. third_ - -.. [#fourth] a.k.a. fourth_ Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/footnoteTest2.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/footnoteTest2.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/footnoteTest2.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,17 +0,0 @@ -Auto-symbol footnotes are also -possible, like this: [*]_ and [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [1]_ aaaa_. - -.. _aaaa: index.html -.. [1] 1 -.. [*] 1 -.. [*] 2 -.. [*] 3 -.. [*] 4 -.. [*] 5 -.. [*] 6 -.. [*] 7 -.. [*] 8 -.. [*] 9 -.. [*] 10 -.. [*] 11 -.. [*] 12 Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/frEntier.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/frEntier.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/frEntier.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,915 +0,0 @@ -================================== -Parseur reStructuredText : le JRst -================================== - -:author: Sylvain LETELLIER <letellier@codelutin> -:organization: Code Lutin -:date: $date: 01/06/2007$ -:copyright: © 2007. JRST - Code Lutin - GPL - ----------------------- - -.. sectnum:: - -.. contents:: Sommaire - -Documentation utilisateur -========================= - - -Présentation ------------- - -Le format reStructuredText est un format de description de documents. A l'image -d'autres LaTeX ou DocBook, il peut être décliné en une multitude de formats. Ces -formats souffrent habituellement d'une syntaxe envahissante qui, si elle est -nécessaire pour des documents très spécifiques, devient gênante quand il s'agit -de créer rapidement un document pas trop complexe. RST dispose quant à lui d'une -syntaxe tellement simple qu'elle en devient presque invisible. - -JRST est un parseur RST en Java permettant de créer une représentation en arbre -d'un document. Il devient alors facile de générer une représentation du document -vers différents formats. - - -Usage ------ - -Le parser JRST prend un fichier reStructuredText en entré et génère un fichier XML -qui pourra ensuite servir à produire divers formats de fichiers grâce à des fichiers -XSL de générations. Les formats de sortie disponibles sont le html, le xhtml, le rst, -le pdf, le docbook, le odt (Open-Office), le rtf, ou encore le XML [1]_. - -:: - - JRST myfile.rst - -Cette commande aura pour effet de convertir le fichier myfile.rst en XML qui sera affiché sur la sortie standard (console). -Plusieurs options sont disponibles : - --o file,--outFile=file pour rediriger la sortie vers un fichier. --t format,--outType format pour préciser un format de sortie, donc utiliser un ou des fichiers XSL de génération. Plusieurs formats sont disponibles xhtml, docbook, xml, html, xdoc, rst, pdf, odt, rtf. --x xslFile,--xslFile xslFile sert à préciser le fichier xsl de génération à utiliser. ---force forcer l'écriture d'un fichier, si le fichier de sortie existe, il sera remplacé. ---help pour afficher les options disponibles : - - -:: - - Usage: [options] FILE - [--force] : overwrite existing out file - [--help] : display this help and exit - [--outFile -o value] : Output file - [--outType -t /xhtml|docbook|xml|html|xdoc|rst/] : Output type - [--xslFile -x value] : XSL file list to apply, comma separated - - -ex : - -:: - - JRST --force -t html -o myfile.html myfile.rst - -Cette commande produira un fichier html (myfile.html) à partir du fichier reStructuredText (myfile.rst) -même si myfile.html existe déjà. - - -Plugin Maven ------------- - -Un plugin Maven est disponible à l'adresse suivante -http://jrst.labs.libre-entreprise.org/maven-jrst-plugin. Il permet l'utilisation -depuis Maven de JRst. - -.. [1] Seul les formats html, xhtml, DocBook, xdoc et pdf sont disponible pour le moment. - -Maven : http://maven.apache.org/ -XSL : http://jrst.labs.libre-entreprise.org/fr/devel/presentationXSL.rst -DocBook : http://www.docbook.org/ -LaTex : http://www.latex-project.org/ - -Introduction à ReStructuredText -=============================== - -Document adaptée du document de Richard Jones : http://docutils.sourceforge.net/sandbox/wilk/french/quickstart-fr.html - - -Ce texte contient des liens de la forme. Ils sont -relatifs au manuel de référence utilisateur Quick reStructuredText. -S'ils ne fonctionnent pas, référez vous au document master quick -reference. - -Quick reStructuredText : http://docutils.sourceforge.net/docs/rst/quickref.html -master quick reference : http://docutils.sourceforge.net/docs/rst/quickref.html - - -Structure ---------- - -Pour commencer, il me semble que "Structured Text" n'est pas tout à fait la -bonne appellation. Nous devrions plutôt le nommer "Relaxed Text" qui contient -quelques schémas logiques. Ces schémas sont interprétés par un convertisseur -HTML pour produire "Very Structured Text" (un texte très structuré) qui pourra -être utilisé par un navigateur web. - -Le schéma le plus simple est le **paragraphe**. -C'est un bloc de texte séparé par des lignes vides (une seule suffit). -Les paragraphes doivent avoir le même décalage -- c'est à dire des espaces -à gauche. Ces paragraphes produiront un texte décalé. Par exemple:: - - Ceci est un paragraphe. - Très court. - - Le texte de ce paragraphe sera décalé, - généralement utilisé pour des citations. - - En voilà un autre - -Le résultat donne : - - Ceci est un paragraphe. - Très court. - - Le texte de ce paragraphe sera décalé, - généralement utilisé pour des citations. - - En voilà un autre - - -Styles de texte ---------------- - - -Dans les paragraphes et le corps du texte, nous pouvons utiliser -des marqueurs pour *italique* avec "`` *italique* ``" ou **gras** -avec "`` **gras** ``". - -Notez qu'aucun traitement supplémentaire n'est apporté entre deux -doubles apostrophes inversées -- les astérisques, comme dans "`` * ``", -sont donc conservées en l'état. - -Si vous souhaitez utiliser un de ces caractères "spéciaux" dans -le texte, il n'y a généralement pas de problème -- reStructuredText -est assez malin. -Par exemple, cet astérisque ``*`` est traité correctement. Si vous -souhaitez par contre ``*``entourer un texte par des astérisques``*`` -**sans** qu'il soit en italique, il est nécessaire d'indiquer que -l'astérisque ne doit pas être interprété. Pour cela il suffit de placer -une barre oblique inversée juste avant lui, comme ça "``\*``", ou -en l'entourant de doubles apostrophes inversées (litteral), comme cela :: - - ``\*`` - -(``\*`` n'est pas implanté dans le JRST seul les `` fonctionnent) - - - -Listes ------- - -Il y a trois types de listes: **numérotées**, **avec puces** et -de **définitions**. Dans chaque cas, nous pouvons avoir autant -de paragraphes, sous-listes, etc. que l'on souhaite, tant que -le décalage à gauche est aligné sur la première ligne. - -Les listes doivent toujours démarrer un nouveau paragraphe --- c'est à dire qu'il doit y avoir un saut de ligne juste avant. - -Listes **numérotées** (par des nombres, lettres, chiffres romains;) - - -En démarrant une ligne avec un numéro ou une lettre suivie d'un -point ".", une parenthèse droite ")" ou entouré par des parenthèses --- comme vous préférez. Toutes ces formes sont reconnues:: - - 1. nombres - - A. Lettres en majuscule - qui continue sur plusieurs ligne - - avec deux paragraphes et tout ! - - a. lettres minuscules - - 3. avec une sous-liste qui démarre à un nombre différent - 4. faites attention à garder une séquence de nombre correcte ! - - I. majuscules en chiffres romains - - i. minuscules en chiffres romains - - (1) des nombres à nouveau - - 1) et encore - -Le résultat (note : Tous les styles de listes ne sont pas toujours -supportés par tous les navigateurs, vous ne verrez donc pas forcément -les effets complets) : - -1. nombres - -A. Lettres en majuscule - qui continue sur plusieurs ligne - - avec deux paragraphes et tout ! - -a. lettres minuscules - - 3. avec une sous-liste qui démarre à un nombre différent - 4. faites attention à garder une séquence de nombre correcte ! - -I. majuscules en chiffres romains - -i. minuscules en chiffres romains - -(1) des nombres à nouveau - -1) et encore - -Listes **à puces** - - -De la même manière que pour les listes numérotées, il faut démarrer -la première ligne avec une puce -- soit "-", "+" ou "*":: - - * une puce "*" - - - une sous-liste avec "-" - - + à nouveau une sous-liste - - - une autre option - -Le résultat: - - * une puce "*" - - - une sous-liste avec "-" - - + à nouveau une sous-liste - - - une autre option - -Les listes de **définitions** - - -Comme les deux autres, les listes de définitions consistent en un -terme et la définition de ce terme. Le format est le suivant:: - - Quoi - Les listes de définitions associent un terme avec une définition. - - *Comment* - Le terme est une phrase d'une ligne, et la définition est d'un - ou plusieurs paragraphes ou éléments, décalés par rapport au terme. - Les lignes vides ne sont pas autorisées entre le terme et la définition. - -Le résultat: - -Quoi - Les listes de définitions associent un terme avec une définition. - -*Comment* - Le terme est une phrase d'une ligne, et la définition est d'un - ou plusieurs paragraphes ou éléments, décalés par rapport au terme. - Les lignes vides ne sont pas autorisées entre le terme et la définition. - -Préformatage ------------- - -Pour inclure un texte préformaté sans traitement -il suffit de terminer le paragraphe par "``::``". Le texte préformaté est -terminé lorsqu'une ligne retombe au niveau du décalage précédent. Par exemple:: - - Un exemple:: - - Espaces, nouvelles lignes, lignes vides, et toutes sortes de marqueurs - (comme *ceci* ou \cela) sont préservés dans les bloc préformatés. - - Fin de l'exemple - -Le résultat: - - Un exemple:: - - Espaces, nouvelles lignes, lignes vides, et toutes sortes de marqueurs - (comme *ceci* ou \cela) sont préservés dans les bloc préformatés. - - Fin de l'exemple - -Notez que si le paragraphe contient seulement "``::``", il est ignoré. - - :: - - Ceci est un texte préformaté, - le paragraphe "::" est ignoré. - -Sections --------- - -Pour diviser un texte en plusieurs sections, nous utilisons des -**en-têtes de section**. C'est à dire une seule ligne de texte (d'un -ou plusieurs mots) avec un ornement : juste en dessous et éventuellement -dessus aussi, avec des tirets "``-----``", égal "``=====``", tildes -"``~~~~~``" ou n'importe quel de ces caractères ``= - ` : ' " ~ ^ _ * + # < >`` -qui vous semble convenir. Un ornement simplement en dessous n'a pas la -même signification qu'un ornement dessus-dessous avec le même caractère. -Les ornements doivent avoir au moins la taille du texte. Soyez cohérent, -les ornements identiques sont censés être du même niveau:: - - Chapitre 1 - ========== - - Section 1.1 - ----------- - - Sous-section 1.1.1 - ~~~~~~~~~~~~~~~~~~ - - Section 1.2 - ----------- - - Chapitre 2 - ========== - -Le résultat de cette structure, sous la forme pseudo-XML:: - - <section> - <title> - Chapitre 1 - <section> - <title> - Section 1.1 - <section> - <title> - Sous-section 1.1.1 - <section> - <title> - Section 1.2 - <section> - <title> - Chapitre 2 - -(Pseudo-XML utilise une indentation et n'as pas de balises finale. Il -n'est pas possible de montrer le résultat, comme dans les autres exemples, -du fait que les sections ne peuvent être utilisées à l'intérieur d'un -paragraphe décalé. Pour un exemple concret, comparez la structure de -ce document avec le résultat.) - -Notez que les en-têtes de section sont utilisable comme cible de liens, -simplement en utilisant leur nom. Pour créer un lien sur la section Listes, -j'écris "``Listes_``". Si le titre comporte des espaces, il est nécessaire -d'utiliser les doubles apostrophes inversées "```Styles de texte```". - -Pour indiquer le titre du document, utilisez un style d'ornement unique -en début de document. Pour indiquer un sous-titre de document, utilisez -un autre ornement unique juste après le titre. -Par exemple:: - - ================= - Titre du document - ================= - ---------- - Sous-titre - ---------- - - Titre de la section - =================== - - ... - -Notez que "Titre du document" et "Titre de la section" utilisent le signe -égal, mais sont différents et sans relation. Le texte et l'ornement peuvent -être de la même taille pour des questions d'esthétisme. - - -Images ------- - -Pour inclure une image dans votre document, vous devez utiliser la directive -``image``. -Par exemple:: - - .. image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/user/images/biohazard.png - -Le résultat: - -.. image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/user/images/biohazard.png - -La partie ``images/biohazard.png`` indique le chemin d'accès au fichier -de l'image qui doit apparaître. Il n'y a pas de restriction sur l'image -(format, taille etc). Si l'image doit apparaître en HTML et que vous -souhaitez lui ajouter des informations:: - - .. image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/user/image/biohazard.png - :height: 100 - :width: 200 - :scale: 50 - :alt: texte alternatif - -Consultez la documentation complète de la directive image pour plus d'informations. - -Documentation images : http://docutils.sourceforge.net/spec/rst/directives.html#images - - -Et ensuite ? ------------- - -Cette introduction montre les possibilités les plus courantes de reStructuredText, -mais il y en a bien d'autres à explorer. Le manuel de référence utilisateur -Quick reStructuredText est recommandé pour aller plus loin. Pour les détails complets -consultez reStructuredText Markup Specification [#]_. - - -.. [#] Si ce lien relatif ne fonctionne pas, consultez le document principal: - http://docutils.sourceforge.net/spec/rst/reStructuredText.html. - -reStructuredText Markup Specification : http://docutils.sourceforge.net/spec/rst/reStructuredText.html -Docutils-Users mailing list : http://lists.sourceforge.net/lists/listinfo/docutils-users -Docutils project web site : http://docutils.sourceforge.net/ - -Fonctionnalités proposées -========================= - -La DTD de Docutils : http://docutils.sourceforge.net/docs/ref/doctree.html - - -Fonctionnalités implantées --------------------------- - -Element racine -~~~~~~~~~~~~~~ - -- document - -Elements titre -~~~~~~~~~~~~~~ - -- subtitle -- title - -Elements bibliographiques -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- docinfo -- author -- authors -- organization -- address -- contact -- version -- revision -- status -- date -- copyright - -Elements de décoration -~~~~~~~~~~~~~~~~~~~~~~ - -- decoration -- footer -- header - -Elements structurels -~~~~~~~~~~~~~~~~~~~~ - -- section -- topic -- sidebar -- transition - -Elements du corps -~~~~~~~~~~~~~~~~~ - -- admonition -- attention -- block_quote -- bullet_list -- caution -- classifier -- danger -- definition -- definition_list -- definition_list_item -- description -- doctest_block -- enumerated_list -- error -- field -- field_body -- field_list -- field_name -- footnote -- hint -- image -- important -- line -- line_block -- list_item -- literal_block -- note -- option -- option_argument -- option_group -- option_list -- option_list_item -- option_string -- paragraph -- term -- tip -- warning - -Elements des tableaux -~~~~~~~~~~~~~~~~~~~~~ - -- table -- tbody -- entry -- row -- colspec -- thead -- tgroup - -Elements de la ligne -~~~~~~~~~~~~~~~~~~~~ - -- emphasis -- strong -- literal -- reference -- footnote_reference - -Fonctionnalités non-implantées ------------------------------- - -- abbreviation -- acronym -- attribution -- caption -- citation -- citation_reference -- comment -- compound -- container -- figure -- generated -- inline -- label -- legend -- pending -- problematic -- raw -- rubric -- subscript -- substitution_definition -- substitution_reference -- superscript -- system_message -- target -- title_reference - - -Documentation développeur -========================= - -Le diagramme de Class ---------------------- - -|classDiagramme| - -La Class **AdvancedReader** à pour fonction de faciliter la lecture du fichier RST grâce à différentes méthodes : - - String readLine() : renvoie une ligne - - String[] readLines(int nombresLigne) : renvoie un certain nombre de lignes - - Stringn[] readWhile(Pattern p) : renvoie les lignes tant qu'elles correspondent au pattern - -... - -La Class **JRSTLexer** utilise **AdvancedReader** pour construire un fichier XML, il parcours -l'ensemble du document pour isoler les types de données, leurs paramètres et leurs contenus, -donc rassembler toutes les informations utiles à la mise en forme du XML final. Il va commencer par -l'entête du document (peekHeader(), peekDocInfo()) pour ensuite s'intéresser au corps (peekBody()). - -La Class **JRSTReader** utilise **JRSTLexer**, il interprète le XML qui lui est renvoyé pour construire -le XML final. Celui-ci est conforme à la DTD définie par DocUtils. Cette Class à parfois besoin de -s'appeler elle même lorsque une partie du document doit être interprétée indépendamment du reste. -Par exemple, s'il y a une liste dans une case d'un tableau, l'on extrait les informations de la case -et on les interprètes, le contenu d'une admoniton (une note) doit lui aussi être considéré comme un -document indépendant. Lorsque la génération est terminée, la Class compose le sommaire (composeContent()) -puis s'occupe de toutes les spécificités « inline » (inline()), comme par exemple les mots en italique ou -gras, les références, les footnotes... Tout ce qui peut apparaître à l'intérieur d'une ligne. - -La Class **reStructuredText** référence toutes les variables nécessaires à la génération du XML final. - -La Class **JRST** contient la méthode main(), elle gère les options, la lecture et l'écriture des fichiers. -Elle lit le document, le parse grâce à la class **JRSTReader** puis applique le XSL désiré (si besoin) -grâce à la class **JRSTGenerator**. - -La génération -------------- - -|diagrammegeneration| - -Référence : - -- xml2rst.xsl (convertion de xml de docutils vers rst) : http://www.merten-home.de/FreeSoftware/xml2rst -- dn2dbk.xsl (convertion de xml de docutils vers docbook) : http://membres.lycos.fr/ebellot/dn2dbk -- les xsl de nwalsh (convertion de docbook vers FO et xhtml) : http://nwalsh.com - -- XMLmind (convertion de FO vers ODT et RTF) : http://www.xmlmind.com/foconverter/what_is_xfc.html -- FOP (convertion de FO vers PDF) : http://xmlgraphics.apache.org/fop - -Exemple d'utilisation ---------------------- - -L'on souhaite convertir le document rst (text.rst) suivant en html (text.html) : - -:: - - ===== - Titre - ===== - - :Author: Letellier Sylvain - - .. Attention:: texte à être réinterprété comme un fichier rst indépendant - ceci est considéré comme un **paragraphe** - -On utilise donc la commande suivante:: - - JRST -t html -o text.html text.rst - -Ce diagramme de séquence décrit le fonctionnement du parseur tout au long de la génération : - -|sequanceDiagramme| - -La Classe **JRSTGenerator**, grâce au fichier XSL rst2xhtml.xsl, renvoie le fichier html suivant:: - - <?xml version="1.0" encoding="UTF-8"?> - <html xmlns="http://www.w3.org/TR/xhtml1/strict"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> - <title>Titre</title> - </head> - <body> - <h1>Titre</h1> - <table class="docinfo" frame="void" rules="none"> - <col class="docinfo-name"/> - <col class="docinfo-content"/> - <tbody valign="top"> - <tr> - <th class="docpatterninfo-name">author :</th> - <td class="docinfo-content">Letellier Sylvain</td> - </tr> - </tbody> - </table> - <div class="attention"> - <p class="title">attention :</p> - <p class="body"> - <p>texte à être réinterprété comme un fichier rst indépendant - ceci est considéré comme un <strong>paragraphe</strong></p> - </p> - </div> - </body> - </html> - -Qui affiche la page (un CSS [2]_ à été ajouté pour la mise en forme) : - -.. topic:: Titre - - :Author: Letellier Sylvain - - .. Attention:: texte à être réinterprété comme un fichier rst indépendant - ceci est considéré comme un **paragraphe** - -Utilisation de XSL externe --------------------------- - -JRST propose de transformer le XML de docutils avec des fichiers XSL externe. -Pour cela, il faut utiliser la commande:: - - JRST -x fichierXSL, fichierXSL2 fichierRST -ou:: - - JRST --xslFile fichierXSL, fichierXSL2 fichierRST - -JRST traitera le fichierRST, le XML de DocUtils qui est retourné sera transformé par la Class JRSTgenerator -en commençant par le fichierXSL puis par le fichierXSL2... - -.. [2] Cascading Style Sheets : http://fr.wikipedia.org/wiki/Feuilles_de_style_en_cascade -.. |diagrammegeneration| image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/devel/images/diagrammeGeneration.png -.. |classDiagramme| image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/devel/images/diagrammeClass.png -.. |sequanceDiagramme| image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/devel/images/diagrammeSequance.png - -Le XSL (Extensible Stylesheets Language) -======================================== - -Introduction ------------- - -XML est un langage de structuration des données, et non de représentation des données. Ainsi XSL -(eXtensible StyleSheet Language) est un langage recommandé par le W3C pour effectuer la représentation -des données de documents XML. XSL est lui-même défini avec le formalisme XML, cela signifie qu'une -feuille de style XSL est un document XML bien formé. - -XSL est un langage permettant de définir des feuilles de style pour les documents XML au même titre que -les CSS (Cascading StyleSheets) pour le langage HTML ou bien DSSSL (Document Style Semantics and -Specification Language) pour le SGML. XSL est d'ailleurs inspiré de DSSSL dont il reprend beaucoup -de fonctionnalités et est compatible avec les CSS (il s'agit d'un sur-ensemble des CSS). - -Toutefois, contrairement aux CSS, XSL permet aussi de retraiter un document XML afin d'en modifier totalement -sa structure, ce qui permet à partir d'un document XML d'être capable de générer d'autres types de documents -(PostScript, HTML, Tex, RTF, ...) ou bien un fichier XML de structure différente. - -Ainsi la structuration des données (définie par XML) et leur représentation (définie par un langage tel que -XSL) sont séparées. Cela signifie qu'il est possible à partir d'un document XML de créer des documents -utilisant différentes représentations (HTML pour créer des pages web, WML pour les mobiles WAP, ...). - -|presentationxsl| - - -Structure d'un document XSL ---------------------------- - -Un document XSL étant un document XML, il commence obligatoirement par la balise suivante:: - - <?xml version="1.0" encoding="UTF-8"?> - - -D'autre part, toute feuille de style XSL est comprise entre les balises <xsl:stylesheet ...> et </xsl:stylesheet>. - -La balise xsl:stylesheet encapsule des balises xsl:template définissant les transformations à faire subir à certains -éléments du document XML. - -:: - - <?xml version="1.0" encoding="UTF-8"?> - <xsl:stylesheet - xmlns:xsl="http://www.w3.org/TR/WD-xsl" - xmlns="http://www.w3.org/TR/REC-html40" - result-ns=""> - <xsl:template ... > - <!-- traitements à effectuer --> - </xsl:template > - </xsl:stylesheet> - - -Association d'une feuille XSL à un document XML ------------------------------------------------ - -Une feuille de style XSL (enregistré dans un fichier dont l'extension est .xsl) peut être liée à un document -XML (de telle manière à ce que le document XML utilise la feuille XSL) en insérant la balise suivante au début -du document XML:: - - <?xml version="1.0" encoding="UTF-8"?> - <?xml-stylesheet href="fichier.xsl" type="text/xsl"?> - - -Les template rules (règles de gabarit) --------------------------------------- - -Les template rules sont des balises XSL permettant de définir des opérations à réaliser sur certains éléments -du document XML utilisant la page XSL, c'est-à-dire généralement de transformer un tag XML en au moins un tag -HTML (généralement plusieurs). - -Ainsi le tag XML suivant:: - - <personne> - <nom>Pillou</nom> - <prenom>Jean-François</prenom> - </personne> - <personne> - <nom>VanHaute</nom> - <prenom>Nico</prenom> - </personne> - <personne> - <nom>Andrieu</nom> - <prenom>Seb</prenom> - </personne> - -pourra être transformé en les tags HTML suivants:: - - <ul> - <li>Pillou - Jean-François</li> - <li>VanHaute - Nico</li> - <li>Andrieu - Seb</li> - </ul> - -L'attribut "match" de la balise <xsl:template> permet de définir (grâce à la notation XPath) le ou les éléments -du document XML sur lesquels s'applique la transformation. - -La notation Xpath permet de définir des patterns, c'est-à-dire des chaînes de caractères permettant de repérer -un noeud dans le document XML. Les principaux patterns sont : - -======= ============= ================================================================= -Pattern Exemple Signification -======= ============= ================================================================= -``|`` Gauche|Milieu Indique une alternative (un noeud ou bien l'autre (ou les deux)) -/ personne/nom Chemin d'accès aux éléments (personne/bras/gauche) -* * Motif "joker" désignant n'importe quel élément -// //personne Indique tous les descendants d'un noeud -. . Caractérise le noeud courant -``..`` ``..`` Désigne le noeud parent -@ @valeur Indique un attribut caractéristique -======= ============= ================================================================= - -La transformation peut être réalisée : - -- soit par ajout de texte, -- soit en définissant des éléments de transformation, c'est-à-dire des éléments permettant de définir - des règles de transformation à appliquer aux éléments sélectionnés par l'attribut match - -Voici un exemple de feuille XSL permettant d'effectuer la transformation XML vers HTML décrite ci-dessus:: - - <?xml version="1.0" encoding="UTF-8"?> - <xsl:stylesheet - xmlns:xsl="http://www.w3.org/TR/WD-xsl" - xmlns="http://www.w3.org/TR/REC-html40" - result-ns=""> - <xsl:template match="/"> - <HTML> - <HEAD> - <TITLE>Titre de la page</TITLE> - </HEAD> - <BODY BGCOLOR="#FFFFFF"> - <xsl:apply-templates/> - </BODY> - </HTML> - </xsl:template > - <xsl:template match="personne" > - <ul> - <li> - <xsl:value-of select="nom"/> - - - <xsl:value-of select="prenom"/> - </li> - </ul> - </xsl:template > - </xsl:stylesheet> - - -Voici la signification de cette feuille XSL : - -* Le premier tag <xsl:template> permet d'appliquer une transformation à l'ensemble du document (la valeur - "/" de l'attribut match indique l'élément racine du document XML). Ce tag contient des balises HTML qui - seront transmises dans l'arbre résultat. -* L'élément <xsl:apply-templates/> indique le traitement de tous les enfants directs de la racine. -* La balise <xsl:template match="personne"> permet d'aller traiter les éléments de type personne. -* Enfin les deux éléments <xsl:value-of select="nom"/> et <xsl:value-of select="prenom"/> permettent de - recuperer les valeurs des balises nom et prenom. - -Références ----------- - -- Article : http://www.commentcamarche.net/xml/xmlxsl.php3 -- Schéma : http://fr.wikipedia.org/wiki/Extended_stylesheet_language_transformations - -.. |presentationxsl| image:: images/presentationXSL.png - -Les différentes librairies utilisées -==================================== - -dom4j ------ - -Dom4j est une API Open Source Java permettant de travailler avec XML, XPath et XSLT. Cette bibliothèque -est compatible avec les standards DOM, SAX et JAXP. - -javax.xml.transform et Xalan ----------------------------- - -javax.xml.transform et Xalan sont deux librairies permettant la transformation XSL. - -SDoc ----- - -SDoc fournit des composants Swing qui inclut la coloration syntaxique pour de nombreux langages. - -Xmlunit -------- - -Xmlunit permet de comparer deux fichiers XML pour mettre en évidences les différences. - -dom4j : http://www.dom4j.org - -javax.xml.transform : http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/package-summary.... - -Xalan : http://xml.apache.org/xalan-j/ - -SDoc : http://sdoc.sourceforge.net/wiki/pmwiki.php - -Xmlunit : http://xmlunit.sourceforge.net/ - - -Documentation externe -===================== - -Le site de docUtils : http://docutils.sourceforge.net/rst.html - -La DTD reStructuredText : http://docutils.sourceforge.net/docs/ref/doctree.html - -Un XSL permettant de convertir le XML en RST : http://www.merten-home.de/FreeSoftware/xml2rst/ - -Pour la génération de la javaDoc en RST : http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/overview.html - - Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/sdoc-0.5.0-beta.jar =================================================================== (Binary files differ) Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/test.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/test.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/test.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,315 +0,0 @@ -===================================== - An Introduction to reStructuredText -===================================== -------------------------------------------------- - Markup Syntax and Parser Component of Docutils -------------------------------------------------- - -:Author: David Goodger -:Contact: goodger@python.org -:Revision: $Revision$ -:Date: $Date$ -:Copyright: This document has been placed in the public domain. - -reStructuredText_ is an easy-to-read, what-you-see-is-what-you-get -plaintext markup syntax and parser system. It is useful for inline -program documentation (such as Python docstrings), for quickly -creating simple web pages, and for standalone documents. -reStructuredText_ is a proposed revision and reinterpretation of the -StructuredText_ and Setext_ lightweight markup systems. - -reStructuredText is designed for extensibility for specific -application domains. Its parser is a component of Docutils_. - -This document defines the goals_ of reStructuredText and provides a -history_ of the project. It is written using the reStructuredText -markup, and therefore serves as an example of its use. For a gentle -introduction to using reStructuredText, please read `A -ReStructuredText Primer`_. The `Quick reStructuredText`_ user -reference is also useful. The `reStructuredText Markup -Specification`_ is the definitive reference. There is also an -analysis of the `Problems With StructuredText`_. - -ReStructuredText's web page is -http://docutils.sourceforge.net/rst.html. - -.. _reStructuredText: http://docutils.sourceforge.net/rst.html -.. _StructuredText: - http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/FrontPage -.. _Setext: http://docutils.sourceforge.net/mirror/setext.html -.. _Docutils: http://docutils.sourceforge.net/ -.. _A ReStructuredText Primer: ../../user/rst/quickstart.html -.. _Quick reStructuredText: ../../user/rst/quickref.html -.. _reStructuredText Markup Specification: restructuredtext.html -.. _Problems with StructuredText: ../../dev/rst/problems.html - -.. contents:: - -Goals -===== - -The primary goal of reStructuredText_ is to define a markup syntax for -use in Python docstrings and other documentation domains, that is -readable and simple, yet powerful enough for non-trivial use. The -intended purpose of the reStructuredText markup is twofold: - -- the establishment of a set of standard conventions allowing the - expression of structure within plaintext, and - -- the conversion of such documents into useful structured data - formats. - -The secondary goal of reStructuredText is to be accepted by the Python -community (by way of being blessed by PythonLabs and the BDFL [#]_) as -a standard for Python inline documentation (possibly one of several -standards, to account for taste). - -.. [#] Python's creator and "Benevolent Dictator For Life", - Guido van Rossum. - -To clarify the primary goal, here are specific design goals, in order, -beginning with the most important: - -1. Readable. The marked-up text must be easy to read without any - prior knowledge of the markup language. It should be as easily - read in raw form as in processed form. - -2. Unobtrusive. The markup that is used should be as simple and - unobtrusive as possible. The simplicity of markup constructs - should be roughly proportional to their frequency of use. The most - common constructs, with natural and obvious markup, should be the - simplest and most unobtrusive. Less common constructs, for which - there is no natural or obvious markup, should be distinctive. - -3. Unambiguous. The rules for markup must not be open for - interpretation. For any given input, there should be one and only - one possible output (including error output). - -4. Unsurprising. Markup constructs should not cause unexpected output - upon processing. As a fallback, there must be a way to prevent - unwanted markup processing when a markup construct is used in a - non-markup context (for example, when documenting the markup syntax - itself). - -5. Intuitive. Markup should be as obvious and easily remembered as - possible, for the author as well as for the reader. Constructs - should take their cues from such naturally occurring sources as - plaintext email messages, newsgroup postings, and text - documentation such as README.txt files. - -6. Easy. It should be easy to mark up text using any ordinary text - editor. - -7. Scalable. The markup should be applicable regardless of the length - of the text. - -8. Powerful. The markup should provide enough constructs to produce a - reasonably rich structured document. - -9. Language-neutral. The markup should apply to multiple natural (as - well as artificial) languages, not only English. - -10. Extensible. The markup should provide a simple syntax and - interface for adding more complex general markup, and custom - markup. - -11. Output-format-neutral. The markup will be appropriate for - processing to multiple output formats, and will not be biased - toward any particular format. - -The design goals above were used as criteria for accepting or -rejecting syntax, or selecting between alternatives. - -It is emphatically *not* the goal of reStructuredText to define -docstring semantics, such as docstring contents or docstring length. -These issues are orthogonal to the markup syntax and beyond the scope -of this specification. - -Also, it is not the goal of reStructuredText to maintain compatibility -with StructuredText_ or Setext_. reStructuredText shamelessly steals -their great ideas and ignores the not-so-great. - -Author's note: - - Due to the nature of the problem we're trying to solve (or, - perhaps, due to the nature of the proposed solution), the above - goals unavoidably conflict. I have tried to extract and distill - the wisdom accumulated over the years in the Python Doc-SIG_ - mailing list and elsewhere, to come up with a coherent and - consistent set of syntax rules, and the above goals by which to - measure them. - - There will inevitably be people who disagree with my particular - choices. Some desire finer control over their markup, others - prefer less. Some are concerned with very short docstrings, - others with full-length documents. This specification is an - effort to provide a reasonably rich set of markup constructs in a - reasonably simple form, that should satisfy a reasonably large - group of reasonable people. - - --David Goodger (goodger@python.org), 2001-04-20 - -.. _Doc-SIG: http://www.python.org/sigs/doc-sig/ - - -History -======= - -reStructuredText_, the specification, is based on StructuredText_ and -Setext_. StructuredText was developed by Jim Fulton of `Zope -Corporation`_ (formerly Digital Creations) and first released in 1996. -It is now released as a part of the open-source "Z Object Publishing -Environment" (ZOPE_). Ian Feldman's and Tony Sanders' earlier Setext_ -specification was either an influence on StructuredText or, by their -similarities, at least evidence of the correctness of this approach. - -I discovered StructuredText_ in late 1999 while searching for a way to -document the Python modules in one of my projects. Version 1.1 of -StructuredText was included in Daniel Larsson's pythondoc_. Although -I was not able to get pythondoc to work for me, I found StructuredText -to be almost ideal for my needs. I joined the Python Doc-SIG_ -(Documentation Special Interest Group) mailing list and found an -ongoing discussion of the shortcomings of the StructuredText -"standard". This discussion has been going on since the inception of -the mailing list in 1996, and possibly predates it. - -I decided to modify the original module with my own extensions and -some suggested by the Doc-SIG members. I soon realized that the -module was not written with extension in mind, so I embarked upon a -general reworking, including adapting it to the "re" regular -expression module (the original inspiration for the name of this -project). Soon after I completed the modifications, I discovered that -StructuredText.py was up to version 1.23 in the ZOPE distribution. -Implementing the new syntax extensions from version 1.23 proved to be -an exercise in frustration, as the complexity of the module had become -overwhelming. - -In 2000, development on StructuredTextNG_ ("Next Generation") began at -`Zope Corporation`_ (then Digital Creations). It seems to have many -improvements, but still suffers from many of the problems of classic -StructuredText. - -I decided that a complete rewrite was in order, and even started a -reStructuredText SourceForge project (now inactive). My -motivations (the "itches" I aim to "scratch") are as follows: - -- I need a standard format for inline documentation of the programs I - write. This inline documentation has to be convertible to other - useful formats, such as HTML. I believe many others have the same - need. - -- I believe in the Setext/StructuredText idea and want to help - formalize the standard. However, I feel the current specifications - and implementations have flaws that desperately need fixing. - -- reStructuredText could form part of the foundation for a - documentation extraction and processing system, greatly benefitting - Python. But it is only a part, not the whole. reStructuredText is - a markup language specification and a reference parser - implementation, but it does not aspire to be the entire system. I - don't want reStructuredText or a hypothetical Python documentation - processor to die stillborn because of over-ambition. - -- Most of all, I want to help ease the documentation chore, the bane - of many a programmer. - -Unfortunately I was sidetracked and stopped working on this project. -In November 2000 I made the time to enumerate the problems of -StructuredText and possible solutions, and complete the first draft of -a specification. This first draft was posted to the Doc-SIG in three -parts: - -- `A Plan for Structured Text`__ -- `Problems With StructuredText`__ -- `reStructuredText: Revised Structured Text Specification`__ - -__ http://mail.python.org/pipermail/doc-sig/2000-November/001239.html -__ http://mail.python.org/pipermail/doc-sig/2000-November/001240.html -__ http://mail.python.org/pipermail/doc-sig/2000-November/001241.html - -In March 2001 a flurry of activity on the Doc-SIG spurred me to -further revise and refine my specification, the result of which you -are now reading. An offshoot of the reStructuredText project has been -the realization that a single markup scheme, no matter how well -thought out, may not be enough. In order to tame the endless debates -on Doc-SIG, a flexible `Docstring Processing System framework`_ needed -to be constructed. This framework has become the more important of -the two projects; reStructuredText_ has found its place as one -possible choice for a single component of the larger framework. - -The project web site and the first project release were rolled out in -June 2001, including posting the second draft of the spec [#spec-2]_ -and the first draft of PEPs 256, 257, and 258 [#peps-1]_ to the -Doc-SIG. These documents and the project implementation proceeded to -evolve at a rapid pace. Implementation history details can be found -in the `project history file`_. - -In November 2001, the reStructuredText parser was nearing completion. -Development of the parser continued with the addition of small -convenience features, improvements to the syntax, the filling in of -gaps, and bug fixes. After a long holiday break, in early 2002 most -development moved over to the other Docutils components, the -"Readers", "Writers", and "Transforms". A "standalone" reader -(processes standalone text file documents) was completed in February, -and a basic HTML writer (producing HTML 4.01, using CSS-1) was -completed in early March. - -`PEP 287`_, "reStructuredText Standard Docstring Format", was created -to formally propose reStructuredText as a standard format for Python -docstrings, PEPs, and other files. It was first posted to -comp.lang.python_ and the Python-dev_ mailing list on 2002-04-02. - -Version 0.4 of the reStructuredText__ and `Docstring Processing -System`_ projects were released in April 2002. The two projects were -immediately merged, renamed to "Docutils_", and a 0.1 release soon -followed. - - -.. [#spec-2] The second draft of the spec: - - - `An Introduction to reStructuredText`__ - - `Problems With StructuredText`__ - - `reStructuredText Markup Specification`__ - - `Python Extensions to the reStructuredText Markup Specification`__ - - __ http://mail.python.org/pipermail/doc-sig/2001-June/001858.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001859.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001860.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001861.html - -.. [#peps-1] First drafts of the PEPs: - - - `PEP 256: Docstring Processing System Framework`__ - - `PEP 258: DPS Generic Implementation Details`__ - - `PEP 257: Docstring Conventions`__ - - Current working versions of the PEPs can be found in - http://docutils.sourceforge.net/docs/peps/, and official versions - can be found in the `master PEP repository`_. - - __ http://mail.python.org/pipermail/doc-sig/2001-June/001855.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001856.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001857.html - - -.. _Zope Corporation: http://www.zope.com -.. _ZOPE: http://www.zope.org -.. _pythondoc: http://starship.python.net/crew/danilo/pythondoc/ -.. _StructuredTextNG: - http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/StructuredTextNG -.. _project history file: ../../../HISTORY.html -.. _PEP 287: ../../peps/pep-0287.html -.. _Docstring Processing System framework: ../../peps/pep-0256.html -.. _comp.lang.python: news:comp.lang.python -.. _Python-dev: http://mail.python.org/pipermail/python-dev/ -.. _Docstring Processing System: http://docstring.sourceforge.net/ -.. _master PEP repository: http://www.python.org/peps/ - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - End: Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/test2.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/test2.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/test2.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,318 +0,0 @@ -===================================== - An Introduction to reStructuredText -===================================== -------------------------------------------------- - Markup Syntax and Parser Component of Docutils -------------------------------------------------- - -:Author: David Goodger -:Contact: goodger@python.org -:Revision: $Revision$ -:Date: $Date$ -:Copyright: This document has been placed in the public domain. - -reStructuredText_ is an easy-to-read, what-you-see-is-what-you-get -plaintext markup syntax and parser system. It is useful for inline -program documentation (such as Python docstrings), for quickly -creating simple web pages, and for standalone documents. -reStructuredText_ is a proposed revision and reinterpretation of the -StructuredText_ and Setext_ lightweight markup systems. - -reStructuredText is designed for extensibility for specific -application domains. Its parser is a component of Docutils_. - -This document defines the goals_ of reStructuredText and provides a -history_ of the project. It is written using the reStructuredText -markup, and therefore serves as an example of its use. For a gentle -introduction to using reStructuredText, please read `A -ReStructuredText Primer`_. The `Quick reStructuredText`_ user -reference is also useful. The `reStructuredText Markup -Specification`_ is the definitive reference. There is also an -analysis of the `Problems With StructuredText`_. - -ReStructuredText's web page is -http://docutils.sourceforge.net/rst.html. - -.. _reStructuredText: http://docutils.sourceforge.net/rst.html -.. _StructuredText: - http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/FrontPage -.. _Setext: http://docutils.sourceforge.net/mirror/setext.html -.. _Docutils: http://docutils.sourceforge.net/ -.. _A ReStructuredText Primer: ../../user/rst/quickstart.html -.. _Quick reStructuredText: ../../user/rst/quickref.html -.. _reStructuredText Markup Specification: restructuredtext.html -.. _Problems with StructuredText: ../../dev/rst/problems.html - -.. contents:: - -Goals -===== - -The primary goal of reStructuredText_ is to define a markup syntax for -use in Python docstrings and other documentation domains, that is -readable and simple, yet powerful enough for non-trivial use. The -intended purpose of the reStructuredText markup is twofold: - -- the establishment of a set of standard conventions allowing the - expression of structure within plaintext, and - -- the conversion of such documents into useful structured data - formats. - -The secondary goal of reStructuredText is to be accepted by the Python -community (by way of being blessed by PythonLabs and the BDFL [#]_) as -a standard for Python inline documentation (possibly one of several -standards, to account for taste). - -.. [#] Python's creator and "Benevolent Dictator For Life", - Guido van Rossum. - -To clarify the primary goal, here are specific design goals, in order, -beginning with the most important: - -1. Readable. The marked-up text must be easy to read without any - prior knowledge of the markup language. It should be as easily - read in raw form as in processed form. - -2. Unobtrusive. The markup that is used should be as simple and - unobtrusive as possible. The simplicity of markup constructs - should be roughly proportional to their frequency of use. The most - common constructs, with natural and obvious markup, should be the - simplest and most unobtrusive. Less common constructs, for which - there is no natural or obvious markup, should be distinctive. - -3. Unambiguous. The rules for markup must not be open for - interpretation. For any given input, there should be one and only - one possible output (including error output). - -4. Unsurprising. Markup constructs should not cause unexpected output - upon processing. As a fallback, there must be a way to prevent - unwanted markup processing when a markup construct is used in a - non-markup context (for example, when documenting the markup syntax - itself). - -5. Intuitive. Markup should be as obvious and easily remembered as - possible, for the author as well as for the reader. Constructs - should take their cues from such naturally occurring sources as - plaintext email messages, newsgroup postings, and text - documentation such as README.txt files. - -6. Easy. It should be easy to mark up text using any ordinary text - editor. - -7. Scalable. The markup should be applicable regardless of the length - of the text. - -8. Powerful. The markup should provide enough constructs to produce a - reasonably rich structured document. - -9. Language-neutral. The markup should apply to multiple natural (as - well as artificial) languages, not only English. - -10. Extensible. The markup should provide a simple syntax and - interface for adding more complex general markup, and custom - markup. - -11. Output-format-neutral. The markup will be appropriate for - processing to multiple output formats, and will not be biased - toward any particular format. - -The design goals above were used as criteria for accepting or -rejecting syntax, or selecting between alternatives. - -It is emphatically *not* the goal of reStructuredText to define -docstring semantics, such as docstring contents or docstring length. -These issues are orthogonal to the markup syntax and beyond the scope -of this specification. - -Also, it is not the goal of reStructuredText to maintain compatibility -with StructuredText_ or Setext_. reStructuredText shamelessly steals -their great ideas and ignores the not-so-great. - -Author's note: - - Due to the nature of the problem we're trying to solve (or, - perhaps, due to the nature of the proposed solution), the above - goals unavoidably conflict. I have tried to extract and distill - the wisdom accumulated over the years in the Python Doc-SIG_ - mailing list and elsewhere, to come up with a coherent and - consistent set of syntax rules, and the above goals by which to - measure them. - - There will inevitably be people who disagree with my particular - choices. Some desire finer control over their markup, others - prefer less. Some are concerned with very short docstrings, - others with full-length documents. This specification is an - effort to provide a reasonably rich set of markup constructs in a - reasonably simple form, that should satisfy a reasonably large - group of reasonable people. - - --David Goodger (goodger@python.org), 2001-04-20 - -.. _Doc-SIG: http://www.python.org/sigs/doc-sig/ - - -History -======= - -reStructuredText_, the specification, is based on StructuredText_ and -Setext_. StructuredText was developed by Jim Fulton of `Zope -Corporation`_ (formerly Digital Creations) and first released in 1996. -It is now released as a part of the open-source "Z Object Publishing -Environment" (ZOPE_). Ian Feldman's and Tony Sanders' earlier Setext_ -specification was either an influence on StructuredText or, by their -similarities, at least evidence of the correctness of this approach. - -I discovered StructuredText_ in late 1999 while searching for a way to -document the Python modules in one of my projects. Version 1.1 of -StructuredText was included in Daniel Larsson's pythondoc_. Although -I was not able to get pythondoc to work for me, I found StructuredText -to be almost ideal for my needs. I joined the Python Doc-SIG_ -(Documentation Special Interest Group) mailing list and found an -ongoing discussion of the shortcomings of the StructuredText -"standard". This discussion has been going on since the inception of -the mailing list in 1996, and possibly predates it. - -I decided to modify the original module with my own extensions and -some suggested by the Doc-SIG members. I soon realized that the -module was not written with extension in mind, so I embarked upon a -general reworking, including adapting it to the "re" regular -expression module (the original inspiration for the name of this -project). Soon after I completed the modifications, I discovered that -StructuredText.py was up to version 1.23 in the ZOPE distribution. -Implementing the new syntax extensions from version 1.23 proved to be -an exercise in frustration, as the complexity of the module had become -overwhelming. - -In 2000, development on StructuredTextNG_ ("Next Generation") began at -`Zope Corporation`_ (then Digital Creations). It seems to have many -improvements, but still suffers from many of the problems of classic -StructuredText. - -I decided that a complete rewrite was in order, and even started a -`reStructuredText SourceForge project`_ (now inactive). My -motivations (the "itches" I aim to "scratch") are as follows: - -- I need a standard format for inline documentation of the programs I - write. This inline documentation has to be convertible to other - useful formats, such as HTML. I believe many others have the same - need. - -- I believe in the Setext/StructuredText idea and want to help - formalize the standard. However, I feel the current specifications - and implementations have flaws that desperately need fixing. - -- reStructuredText could form part of the foundation for a - documentation extraction and processing system, greatly benefitting - Python. But it is only a part, not the whole. reStructuredText is - a markup language specification and a reference parser - implementation, but it does not aspire to be the entire system. I - don't want reStructuredText or a hypothetical Python documentation - processor to die stillborn because of over-ambition. - -- Most of all, I want to help ease the documentation chore, the bane - of many a programmer. - -Unfortunately I was sidetracked and stopped working on this project. -In November 2000 I made the time to enumerate the problems of -StructuredText and possible solutions, and complete the first draft of -a specification. This first draft was posted to the Doc-SIG in three -parts: - -- `A Plan for Structured Text`__ -- `Problems With StructuredText`__ -- `reStructuredText: Revised Structured Text Specification`__ - -__ http://mail.python.org/pipermail/doc-sig/2000-November/001239.html -__ http://mail.python.org/pipermail/doc-sig/2000-November/001240.html -__ http://mail.python.org/pipermail/doc-sig/2000-November/001241.html - -In March 2001 a flurry of activity on the Doc-SIG spurred me to -further revise and refine my specification, the result of which you -are now reading. An offshoot of the reStructuredText project has been -the realization that a single markup scheme, no matter how well -thought out, may not be enough. In order to tame the endless debates -on Doc-SIG, a flexible `Docstring Processing System framework`_ needed -to be constructed. This framework has become the more important of -the two projects; reStructuredText_ has found its place as one -possible choice for a single component of the larger framework. - -The project web site and the first project release were rolled out in -June 2001, including posting the second draft of the spec [#spec-2]_ -and the first draft of PEPs 256, 257, and 258 [#peps-1]_ to the -Doc-SIG. These documents and the project implementation proceeded to -evolve at a rapid pace. Implementation history details can be found -in the `project history file`_. - -In November 2001, the reStructuredText parser was nearing completion. -Development of the parser continued with the addition of small -convenience features, improvements to the syntax, the filling in of -gaps, and bug fixes. After a long holiday break, in early 2002 most -development moved over to the other Docutils components, the -"Readers", "Writers", and "Transforms". A "standalone" reader -(processes standalone text file documents) was completed in February, -and a basic HTML writer (producing HTML 4.01, using CSS-1) was -completed in early March. - -`PEP 287`_, "reStructuredText Standard Docstring Format", was created -to formally propose reStructuredText as a standard format for Python -docstrings, PEPs, and other files. It was first posted to -comp.lang.python_ and the Python-dev_ mailing list on 2002-04-02. - -Version 0.4 of the reStructuredText__ and `Docstring Processing -System`_ projects were released in April 2002. The two projects were -immediately merged, renamed to "Docutils_", and a 0.1 release soon -followed. - -.. __: `reStructuredText SourceForge project`_ - -.. [#spec-2] The second draft of the spec: - - - `An Introduction to reStructuredText`__ - - `Problems With StructuredText`__ - - `reStructuredText Markup Specification`__ - - `Python Extensions to the reStructuredText Markup Specification`__ - - __ http://mail.python.org/pipermail/doc-sig/2001-June/001858.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001859.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001860.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001861.html - -.. [#peps-1] First drafts of the PEPs: - - - `PEP 256: Docstring Processing System Framework`__ - - `PEP 258: DPS Generic Implementation Details`__ - - `PEP 257: Docstring Conventions`__ - - Current working versions of the PEPs can be found in - http://docutils.sourceforge.net/docs/peps/, and official versions - can be found in the `master PEP repository`_. - - __ http://mail.python.org/pipermail/doc-sig/2001-June/001855.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001856.html - __ http://mail.python.org/pipermail/doc-sig/2001-June/001857.html - - -.. _Zope Corporation: http://www.zope.com -.. _ZOPE: http://www.zope.org -.. _reStructuredText SourceForge project: - http://structuredtext.sourceforge.net/ -.. _pythondoc: http://starship.python.net/crew/danilo/pythondoc/ -.. _StructuredTextNG: - http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/StructuredTextNG -.. _project history file: ../../../HISTORY.html -.. _PEP 287: ../../peps/pep-0287.html -.. _Docstring Processing System framework: ../../peps/pep-0256.html -.. _comp.lang.python: news:comp.lang.python -.. _Python-dev: http://mail.python.org/pipermail/python-dev/ -.. _Docstring Processing System: http://docstring.sourceforge.net/ -.. _master PEP repository: http://www.python.org/peps/ - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - End: Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/test3.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/test3.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/test3.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,93 +0,0 @@ -====================== -Introduction to Prest -====================== -:Author: Mark Nodine -:Contact: mnodine@alum.mit.edu -:Revision: $Revision$ -:Date: $Date$ -:Copyright: This document has been placed in the public domain. - -.. contents:: - --------------- - Introduction --------------- - -This document gives an introduction to the ``prest`` program, which is -a Perl implementation of a reStructuredText_ parser (and writers) and -gives a map of the documentation. - -.. _reStructuredText: http://docutils.sourceforge.net/rst.html - -reStructuredText_ is an easy-to-read, what-you-see-is-what-you-get -plaintext markup syntax and parser system. It is useful for inline -program documentation (such as Python docstrings), for quickly -creating simple web pages, and for standalone documents. This web -page was generated from reStructuredText. The original implementation -of a reStructuredText parser is that of the docutils_ project, written -in Python. The "prest" name is an acronym for "**P**\ erl -**reS**\ tructured\ **T**\ ext". - -.. _docutils: http://docutils.sourceforge.net - ---------------- - Documentation ---------------- - -Since prest is a re-implementation of a reStructuredText parser, it has -diverged from the original Python version, both because the Python -version has made changes not tracked by the Perl version and because -the Perl version has added some innovations of its own. So the -documentation references have potentially three versions: the prest -version, the Docutils version, and a difference between the two. -The difference is based on the latest Docutils version available when -the prest documentation was compiled. - -======================================== ================= ==================== ====== -A ReStructuredText Primer `docutils version`__ -Quick reStructuredText `docutils version`__ -An Introduction to reStructuredText `prest version`__ `docutils version`__ diff__ -reStructuredText Markup Specification `prest version`__ `docutils version`__ diff__ -reStructuredText Directives `prest version`__ `docutils version`__ diff__ -reStructuredText Interpreted Text Roles `prest version`__ `docutils version`__ diff__ -Usage of Prest `prest version`__ -Internals of Prest `prest version`__ -How to Extend Prest `prest version`__ -Prest Release Notes `prest version`__ -======================================== ================= ==================== ====== - -__ http://docutils.sourceforge.net/docs/rst/quickstart.html - -__ http://docutils.sourceforge.net/docs/rst/quickref.html - -__ introduction.html -__ http://docutils.sourceforge.net/docs/ref/rst/introduction.html -__ introduction_diff.html - -__ reStructuredText.html -__ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html -__ reStructuredText_diff.html - -__ directives.html -__ http://docutils.sourceforge.net/docs/ref/rst/directives.html -__ directives_diff.html - -__ roles.html -__ http://docutils.sourceforge.net/docs/ref/rst/roles.html -__ roles_diff.html - -__ prest_usage.html - -__ prest_internals.html - -__ prest_extend.html - -__ prest_releases.html - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - End: Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/test4.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/test4.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/test4.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,406 +0,0 @@ -===================================== -Tutoriel pour la création d'un module -===================================== - -:Author: Ruchaud Julien <ruchaud@codelutin.com> -:Revision: $Revision$ -:Date: $Date$ - -.. contents:: - - -Exemple -------- - -Ce tutoriel montre le développement d'un module en reprenant les différentes parties de la documentation développeur. L'exemple traité est la gestion électronique de documents. Le module GED est limité à un modèle super simple. - -Les fonctionnalités du module GED sont les suivantes : - -- Ajout/Suppression de documents -- Visualisation de la liste des documents - -Les différents fichiers de notre module seront répartis dans les répertoires suivants : - -- pour le modèle : /src/xmi -- pour la vue : /src/webapp/WEB-INF/ged -- pour le contrôleur : /src/java/web/mentawai/ged - - -Modèle ------- - - -Etape 1 : Création du modèle sur ArgoUML -++++++++++++++++++++++++++++++++++++++++ - -Le modèle est le plus simple possible, il ne comporte qu'une seule classe, Document. Elle définie un document avec son nom et sa description. - -:: - - +----------------------------------+ - | «entity» | - | Document | - +----------------------------------+ - | name : String | - | description : String | - +----------------------------------+ - | getNameAndDescription() : String | - +----------------------------------+ - -Le modèle est à créer dans le fichier /src/xmi/chorem.zargo dans le paquetage org.codelutin.chorem.entities.ged. On remarque que la classe porte le stéréotype Entity, ceci permet d'indiquer que Topia se chargera de la génération de cette classe ainsi que de sa persistance. - - -Etape 2 : Génération du code avec ToPIA -+++++++++++++++++++++++++++++++++++++++ - -Le plugin Maven 2 Generator se charge de lancer la génération de ToPIA. Par la commande "mvn compile", nous lançons la compilation du projet ainsi que la génération ToPIA. Nous obtenons les classes Java et les fichiers de mapping Hibernate dans le répertoire /src/gen/java/org/codelutin/chorem/entities/ged. -Le projet ne compile pas car il ne trouve pas l'implémentation des méthodes du modèle : - -:: - - [INFO] Compilation failure - /chorem3/target/src-build/java/org/codelutin/chorem/ChoremDAOHelper.java:[76,41] cannot find symbol - symbol : class DocumentImpl - location: package org.codelutin.chorem.entities.ged - - -Etape 3 : Implémentation des méthodes -+++++++++++++++++++++++++++++++++++++ - -Les méthodes contenues dans le modèle n'étant pas implémentées, il est maintenant nécessaire de les complèter. Elles sont a compléter dans le répertoire /src/java/org/codelutin/chorem/entities/ged et porte comme nom, le nom de classe avec le suffixe "Impl". Elle doivent hériter de sa classe abstraite et implémenter son interface. - -:: - - public class DocumentImpl extends DocumentAbstract implements Document { - public String getNameAndDescription() { - return getName() + " " + getDescription(); - } - } - -Maintenant la compilation (mvn compile) ne doit plus produire d'erreur. - - -Etape 4 : Modification des classes de persistances -++++++++++++++++++++++++++++++++++++++++++++++++++ - -La propriété topia.persistence.classes dans le fichier /src/ressources/TopiaContextImpl.properties doit contenir la classe Document. - -:: - - topia.persistence.classes=...,org.codelutin.chorem.entities.ged.DocumentImpl,... - - -Vue ---- - - -Etape 5 : Déclaration du module au niveau du Layout -+++++++++++++++++++++++++++++++++++++++++++++++++++ - -Il faut déclarer le nom du module dans les fichiers de langue dans le répertoire /src/webapp/WEB-INF/common/lang. - -:: - - ged = GED - -Après, il faut ajouter le module dans l'entête, fichier /src/webapp/WEB-INF/common/layout/layout.jsp, pour pouvoir donner l'accès à celui-ci. - -:: - - | <a class="Link" href="${path}/ged.mtw"><fmt:message key="ged" bundle="${commonBundle}"/></a> - - -Etape 6 : Création du menu -++++++++++++++++++++++++++ - -Chaque module a son propre menu. Il faut créer le fichier /src/webapp/ged/common/menu.jsp pour ajouter un menu au module GED. - -:: - - <%@ include file="/WEB-INF/common/taglibs.jsp"%> - <h1 class="tab" onclick="tabHideShow('tabMenu');"><fmt:message key="tabMenu.title"/></h1> - <div id="tabMenu" class="${cookie.tabMenu.value}"> - <h2 class="Title"><fmt:message key="tabMenu.shortcuts"/></h2> - <menu class="Menu"> - <li><a class="Link" href="${pathModule}/ged.mtw"><fmt:message key="tabMenu.shortcuts.ged"/></a></li> - </menu> - </div> - - <jsp:include page="${common}/layout/tabSpace.jsp"/> - - -Etape 7 : Création des pages -++++++++++++++++++++++++++++ - -Il faut créer les pages JSP de visualisation du module. Quelques règles sont à respecter : - 1. Il faut toujours regarder et recopier ce qui a été fait. - 2. Tous les formulaires doivent être créés avec le tag chorem:action. - 3. Aucun texte doit être fixe dans la page, il faut utiliser fmt:message. - -Les deux fichiers sont stockés dans le répertoire /src/webapp/ged/document. - -Le fichier list.jsp permet de visualiser la liste des documents : - -:: - - <%@ include file="/WEB-INF/common/taglibs.jsp"%> - <jsp:include page="${headerPage}"/> - - <h1 class="Title"><fmt:message key="document.list.title"/></h1><hr class="Ligne"/> - - <div class="FormActions"> - <chorem:action mtw="${pathModule}/document/new.mtw"> - <input type="submit" value="<fmt:message key="button.new" bundle="${commonBundle}"/>"> - </chorem:action> - </div> - - <div class="Container"> - <table class="Large"> - <tr class="First"> - <td><fmt:message key="document.list.name"/></td> - <td><fmt:message key="document.list.description"/></td> - </tr> - - <mtw:list value="documents"> - <mtw:isEmpty><td colspan="2" align="center"><fmt:message key="document.list.empty"/></td></mtw:isEmpty> - - <mtw:loop var="eltDocument"> - <tr> - <td>${eltDocument.name}</td> - <td>${eltDocument.description}</td> - <td class="Actions"> - <chorem:action mtw="${pathModule}/document/del.mtw"> - <input type="hidden" name="documentId" value ="${eltDocument.topiaId}"> - <input type="submit" value="<fmt:message key="button.delete" bundle="${commonBundle}"/>"> - </chorem:action> - </td> - </tr> - </mtw:loop> - </mtw:list> - </table> - </div> - - -Le fichier form.jsp permet de modifier ou creer un nouveau document : - -:: - - <%@ include file="/WEB-INF/common/taglibs.jsp"%> - <jsp:include page="${headerPage}"/> - <h1 class="Title"><fmt:message key="document.form.title"/></h1><hr class="Ligne"/> - - <!-- Partie enregistrement --> - <chorem:action name="store" mtw="${pathModule}/document/store.mtw"> - <div class="Container"> - <div class="FormLeft"> - <div class="Text"><fmt:message key="document.form.name"/></div> - <div class="Text"><fmt:message key="document.form.description"/></div> - </div> - - <div class="FormRight"> - <div class="Normal"> - <input type="text" name="name" value="${document.name}"/> - </div> - <div class="Normal"> - <input type="text" name="description" value="${document.description}"/> - </div> - </div> - </div> - </chorem:action> - - <!-- Partie annulation --> - <chorem:action name="cancel" mtw="${pathModule}/document/cancel.mtw"/> - - <!-- Partie actions --> - <div class="FormActions"> - <button onclick="document.cancel.submit();"><fmt:message key="button.cancel" bundle="${commonBundle}"/></button> - <button onclick="document.store.submit();"><fmt:message key="button.store" bundle="${commonBundle}"/></button> - </div> - - -Etape 8 : Internationalisation -++++++++++++++++++++++++++++++ - -Pour finir les pages jsp, il faut créer les fichiers de langue dans le répertoire /src/webapp/WEB-INF/ged/common/lang. De plus, il faut rajouter ce répertoire comme ressource dans le pom.xml de Maven. - - -Fichier de langue pour le français est ged_fr.properties, il contient : - -:: - - ## Menu ## - tabMenu.title = Menu - tabMenu.shortcuts = Raccourcis - tabMenu.shortcuts.ged = Documents - - ## Document ## - document.list.title = Liste des documents - document.list.empty = Vide - document.list.name = Nom - document.list.description = Description - - document.form.title = Liste des documents - document.form.name = Nom : - document.form.description = Description : - -Généralement les clés sont de la forme suivante : "nom de l'entité"."nom de la page"."nom de l'élément" = ... - -Le bundle commun (${commonBundle}) contient l'ensemble des traductions transversales à tous les modules. - - -Contrôleur ----------- - - -Etape 9 : Création des actions -++++++++++++++++++++++++++++++ - -Quatres actions sont toujours créer pour chaque entités du modèle, elles permettent les manipulations de base. Elles sont stockées dans le package actions du module. - -Ces actions vont être nécessaire pour notre exemple les voici, elle doit être dans src/java/org/codelutin/chorem/web/mentawai/ged/action/document : - -DocumentFindId.java, permet de rechercher un document par rapport à son identifiant : - -:: - - public class DocumentFindId extends ElementaryAction { - @TopiaBean - private Document document; - - public void action() throws Exception { - } - } - -DocumentFindAll.java, permet de récupérer l'ensemble des documents : - -:: - - public class DocumentFindAll extends ElementaryAction { - public void action() throws Exception { - DocumentDAO documentPS = ChoremDAOHelper.getDocumentDAO(transaction); - output.setValue("documents", documentPS.findAll()); - } - } - -DocumentUpdate.java, permet de créer et de modifier un document : - -:: - - public class DocumentUpdate extends ElementaryAction implements Validatable { - @TopiaBean(recuperation = true) - private Document document; - - public void action() throws Exception { - document.update(); - addMessage(MESSAGE_STORE); - } - - public void initValidator(Validator validator, String innerAction) { - super.initValidator(validator, innerAction); - addRule(RequiredFieldRule.class, "name"); - } - } - - -DocumentDelete.java, permet la suppression d'un document : - -:: - - public class DocumentDelete extends ElementaryAction { - @TopiaBean - private Document document; - - public void action() throws Exception { - document.delete(); - addMessage(MESSAGE_DELETE); - } - } - - -Etape 10 : Création du Manageur -+++++++++++++++++++++++++++++++ - -Le manageur centralise l'ensemble des urls, des pages et des cas d'utilisation avec les actions associées. Pour la GED la classe à créer est src/java/org/codelutin/chorem/web/mentawai/ged/Manager.java : - -:: - - public class Manager extends org.codelutin.chorem.web.mentawai.Manager { - public static String DOCUMENT_LIST_JSP = "/WEB-INF/ged/document/list.jsp"; - public static String DOCUMENT_FORM_JSP = "/WEB-INF/ged/document/form.jsp"; - public static String DOCUMENT_DEL = "ged/document/del"; - public static String DOCUMENT_NEW = "ged/document/new"; - public static String DOCUMENT_MODIFY = "ged/document/modify"; - public static String DOCUMENT_STORE = "ged/document/store"; - public static String DOCUMENT_CANCEL = "ged/document/cancel"; - - public void loadActions() { - // Actions de l'utilisateur - createFirstLine(DOCUMENT_DEL, DocumentDelete.class); - createFirstLine(DOCUMENT_NEW, SuccessAction.class); - createFirstLine(DOCUMENT_MODIFY, SuccessAction.class); - createFirstLine(DOCUMENT_STORE, DocumentUpdate.class); - createFirstLine(DOCUMENT_CANCEL, SuccessAction.class); - // JSP et actions liées - createLastLine(DOCUMENT_LIST_JSP, DocumentFindAll.class); - createLastLine(DOCUMENT_FORM_JSP, DocumentFindId.class); - } - } - - -Etape 11 : Création des cas d'utilisation -+++++++++++++++++++++++++++++++++++++++++ - -Il faut maintenant créer les cas d'utilisation. Pour notre module, un seul suffit, aucune page ne présente de comportements différents. La classe à créer est src/java/org/codelutin/chorem/web/mentawai/ged/usecase/DocumentUseCase.java : - -:: - - public class DocumentUseCase extends UseCase { - public String general() throws Exception { - // En partant de la liste des docs on retourne sur cette liste en supprimant un doc ou on accède au formulaire de création - accessPoint(DOCUMENT_LIST_JSP).move(DOCUMENT_DEL, DOCUMENT_LIST_JSP).move(DOCUMENT_NEW, DOCUMENT_FORM_JSP); - - // En partant du formulaire de création on retourne à la liste des docs en validant la création ou en l'annulant - access(DOCUMENT_FORM_JSP, "documentId").move(DOCUMENT_CANCEL, DOCUMENT_LIST_JSP).move(DOCUMENT_STORE, DOCUMENT_LIST_JSP); - - return super.execute(); - } - } - - -Ajoutons ensuite le cas d'utilisation au manageur du module : - -:: - - public class Manager extends org.codelutin.chorem.web.mentawai.Manager { - - public static String DOCUMENT_USE_CASE = "ged/general"; - - public void loadActions() { - // Cas d'utilisation - createUseCase(DOCUMENT_USE_CASE, DocumentUseCase.class); - createAccessModule("ged", DOCUMENT_USE_CASE); - } - } - - -Etape 12 : Déclaration du module -++++++++++++++++++++++++++++++++ - -Il est nécessaire d'ajouter le chargement du manageur du module GED dans le manageur global de Chorem (src/java/org/codelutin/chorem/web/mentawai/Manager.java) : - -:: - - /* GED */ - modules.add(new org.codelutin.chorem.web.mentawai.ged.Manager()); - - -Test ----- - - -Etape 13 : Démarrer Chorem -++++++++++++++++++++++++++ - - -Etape 14 : Tester le nouveau module -+++++++++++++++++++++++++++++++++++ Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/text.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/text.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/text.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,375 +0,0 @@ -============== -Le grand titre -============== - ----------- - subtitle ----------- - -.. include:: /home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/textHeader.rst - -.. sectnum:: - - ------------------- - - -.. contents:: Sommaire - :depth: 3 - - - -L'abstract de l'article - -Le premier titre -================ - -Un paragraphe - -Un autre paragraphe - -Un sous titre -------------- - -Un para de la sous section - -Un autre sous titre -------------------- - -Un autre para - -Le *deuxime* titre -================== - -*avec* un para sur **plusieurs -ligne** histoire de *voir* - -et un autre ``para aussi **sur -plusieurs lignes** mais sans gras`` - -LISTES ------- - -- une petite liste -- qui contient -- plusieurs elements - et meme sur plusieur ligne - - voir meme avec plusieurs paragraphe - et des liens http://www.codelutin.com - - encore un petit - -- et la suite de la liste -- pour finir - -3. et meme - -4. des enum - -#. pour voir - -I) de tout - -II) sorte - -(a) pour tout - -(b) tester - -(#) vraiment tout - -FIELD ------ - -:un peu: de field - ca ne fait pas - de mal - - -:field1: avec un - petit texte - - - et meme un - - debut - - de list -:field2: todo - -DEFINITIONS ------------ - -un autre mot - une autre definition - -le mot : la classe - la definition - - avec un autre para - sur plusieurs lignes:: - - Et meme - avec *des* - ligne a - - preserver - tel quelles - sont - -le mot : la classe 1 : la classe 2 - la definition - - -SEPARATION ----------- - -avant - ------------------------------ - -apres - -Un tire -------- - -Un mini titre -~~~~~~~~~~~~~ - -Un autre encore plus mini qui ne sera pas afficher dans le sommaire -''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Litteral --------- - -:: - - public int unread(String [] lines, boolean addNewLine) { - int result = 0; - for (String line : lines) { - result += unread(line, addNewLine); - } - return result; - } - -un para 0 - - un para pluie - de 2 - -TABLE COMPLEXE --------------- - -+------------------------+------------+----------+----------+ -| Header row, column 1 | Header 2 | Header 3 | Header 4 | -| (header rows optional) | | | | -+========================+============+==========+==========+ -| body row 1, column 1 | column 2 | column 3 | column 4 | -+------------------------+------------+----------+----------+ -| body row 2 | Cells may span columns. | -+------------------------+------------+---------------------+ -| body row 3 | Cells may | - Table cells | -+------------------------+ span rows. | - contain | -| body row 4 | | - body elements. | -+------------------------+------------+---------------------+ - -+------------------------+------------+---------------------+ -| body row 3 | Cells may | - Table cells | -+------------------------+ span rows. | - contain | -| body row 4 | | - body elements. | -+------------------------+------------+---------------------+ - -TABLE SIMPLE ------------- - -================ ============================================================ -Bullet list * items begin with "-", "+", or "*" -Enumerated list 1. items use any variation of "1.", "A)", and "(i)" - #. also auto-enumerated -Definition list Term is flush-left : optional classifier - Definition is indented, no blank line between -Field list :field name: field body -Option list -o at least 2 spaces between option & description -================ ============================================================ - - -===== ===== ====== - Inputs Output ------------- ------ - A B AorB ------------- ------ - A B A or B -===== ===== ====== -False False Second column of row 1. -True False Second column of row 2. -True 2 - Second column of row 3. - - Second item in bullet - list (row 3, column 2). -===== ===== ====== - -IMAGE ------ - -The |the big: biohazard| symbol must be used on containers used to dispose of medical waste. - -.. |the big: biohazard| image:: biohazard.png - -LIEN INLINE ------------ - -Une *petit* phare `pour avoir <http://www.free.fr>`_ un lien inline - -FIELD ------ - -:field1: def1 -:field2: def2 - -:field1: autre def1 -:field2: autre def2 - -ADMONITIONS ------------ - -.. admonition:: And, by the way... - - You can make up your own admonition too. - - :field1: autre def1 - :field2: autre def2 - -.. Attention:: All your base are belong to us. - You can make - -.. WARNING::The "raw" role is a stop-gap measure allowing the author to bypass:: - reStructuredText's markup. It is a "power-user" feature that - should not be overused or abused. The use of "raw" ties documents - to specific output formats and makes them less portable. - - If you often need to use "raw"-derived interpreted text roles or - the "raw" directive, that is a sign either of overuse/abuse or that - functionality may be missing from reStructuredText. Please - describe your situation in a message to the Docutils-users mailing - list. - - -.. admonition:: The "raw" role is a stop-gap measure allowing the author to bypass:: - reStructuredText's markup. It is a "power-user" feature that - should not be overused or abused. The use of "raw" ties documents - to specific output formats and makes them less portable. - - If you often need to use "raw"-derived interpreted text roles or - the "raw" directive, that is a sign either of overuse/abuse or that - functionality may be missing from reStructuredText. Please - describe your situation in a message to the Docutils-users mailing - list. - - - -.. Attention:: Derrière toi c'est horrible ! - - -.. admonition:: Ceci est un avertissement. - - Je vous demande de vous arrêtez. - -BLOCK QUOTE ------------ - -As a great paleontologist once said, - - This theory, that is mine, is mine. - - -- Anne Elk (Miss) - -DOCTEST BLOCK -------------- - ->>> print 'this is a Doctest block' -this is a Doctest block - -LINE BLOC ---------- - -| A one, two, a one two three four -| -| Half a bee, philosophically, -| must, *ipso facto*, half not be. -| But half the bee has got to be, -| *vis a vis* its entity. D'you see? -| -| But can a bee be said to be -| or not to be an entire bee, -| when half the bee is not a bee, -| due to some ancient injury? -| -| Singing... - -SIDEBAR -------- - -.. sidebar:: Title - :subtitle: If Desired - - Body. - -TOPIC ------ - -.. topic:: Title - - Body. - -.. header:: Ceci est une page de test - -.. footer:: Cree par **LETELLIER Sylvain** - -OPTION ------- - --a command-line option "a" --1 file, --one=file, --two file Multiple options with arguments. - -FOOTNOTES ---------- - -[#]_ is a reference to footnote 1, and [#]_ is a reference to -footnote 2. - -.. [#] This is footnote 1. -.. [#] This is footnote 2. -.. [#] This is footnote 3. - -[#]_ is a reference to footnote 3. - - -HYPERLINK ---------- - -it's an anonymous-hyperlink__ and this one is an simple hyperlink_ - -__ http://www.google.fr - -.. _hyperlink: http://www.google.fr - -COMMENT -------- - -.. - Ceci est un commentaire - -INLINE ------- - -``literal``, *emphasis*, **STRONG**, http://www.reference.com, letellier@codelutin.com - -INCLUDE -------- - -.. include:: literal - /home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/textLiteral.txt - -la derniere ligne. - - - - - Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/textEntier.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/textEntier.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/textEntier.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,380 +0,0 @@ -============== -Le grand titre -============== - ----------- - subtitle ----------- - -:authors: Benjamin POUSSIN <poussin@codelutin> ; Sylvain LETELLIER <letellier@codelutin> -:organization: Code Lutin -:address: 6 chemin des Orans - 44240 La Chapelle sur Erdre -:version: 2.1 -:status: a finir -:revision: 51 -:date: $date: 28/10/2006$ -:Un champs: au milieu - de null part - - avec meme un para -:copyright: © 2007. JRST - Code Lutin - GPL - ------------------- - -.. sectnum:: - -.. contents:: sommaire - :depth: 3 - - - -L'abstract de l'article - -Le premier titre -================ - -Un paragraphe - -Un autre paragraphe - -Un sous titre -------------- - -Un para de la sous section - -Un autre sous titre -------------------- - -Un autre para - -Le *deuxime* titre -================== - -*avec* un para sur **plusieurs -ligne** histoire de *voir* - -et un autre ``para aussi **sur -plusieurs lignes** mais sans gras`` - -LISTES ------- - -- une petite liste -- qui contient -- plusieurs elements - et meme sur plusieur ligne - - voir meme avec plusieurs paragraphe - et des liens http://www.codelutin.com - - encore un petit - -- et la suite de la liste -- pour finir - -3. et meme - -4. des enum - -#. pour voir - -I) de tout - -II) sorte - -(a) pour tout - -(b) tester - -(#) vraiment tout - -FIELD ------ - -:un peu: de field - ca ne fait pas - de mal - - -:field1: avec un - petit texte - - - et meme un - - debut - - de list -:field2: todo - -DEFINITIONS ------------ - -un autre mot - une autre definition - -le mot : la classe - la definition - - avec un autre para - sur plusieurs lignes:: - - Et meme - avec *des* - ligne a - - preserver - tel quelles - sont - -le mot : la classe 1 : la classe 2 - la definition - - -SEPARATION ----------- - -avant - ------------------------------ - -apres - -Un tire -------- - -Un mini titre -~~~~~~~~~~~~~ - -Un autre encore plus mini qui ne sera pas afficher dans le sommaire -''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Litteral --------- - -:: - - public int unread(String [] lines, boolean addNewLine) { - int result = 0; - for (String line : lines) { - result += unread(line, addNewLine); - } - return result; - } - -un para 0 - - un para pluie - de 2 - -TABLE COMPLEXE --------------- - -+------------------------+------------+----------+----------+ -| Header row, column 1 | Header 2 | Header 3 | Header 4 | -| (header rows optional) | | | | -+========================+============+==========+==========+ -| body row 1, column 1 | column 2 | column 3 | column 4 | -+------------------------+------------+----------+----------+ -| body row 2 | Cells may span columns. | -+------------------------+------------+---------------------+ -| body row 3 | Cells may | - Table cells | -+------------------------+ span rows. | - contain | -| body row 4 | | - body elements. | -+------------------------+------------+---------------------+ - -+------------------------+------------+---------------------+ -| body row 3 | Cells may | - Table cells | -+------------------------+ span rows. | - contain | -| body row 4 | | - body elements. | -+------------------------+------------+---------------------+ - -TABLE SIMPLE ------------- - -================ ============================================================ -Bullet list * items begin with "-", "+", or "*" -Enumerated list 1. items use any variation of "1.", "A)", and "(i)" - #. also auto-enumerated -Definition list Term is flush-left : optional classifier - Definition is indented, no blank line between -Field list :field name: field body -Option list -o at least 2 spaces between option & description -================ ============================================================ - - -===== ===== ====== - Inputs Output ------------- ------ - A B AorB ------------- ------ - A B A or B -===== ===== ====== -False False Second column of row 1. -True False Second column of row 2. -True 2 - Second column of row 3. - - Second item in bullet - list (row 3, column 2). -===== ===== ====== - -IMAGE ------ - -The |the big: biohazard| symbol must be used on containers used to dispose of medical waste. - -.. |the big: biohazard| image:: biohazard.png - -LIEN INLINE ------------ - -Une *petit* phare `pour avoir <http://www.free.fr>`_ un lien inline - -FIELD ------ - -:field1: def1 -:field2: def2 - -:field1: autre def1 -:field2: autre def2 - -ADMONITIONS ------------ - -.. admonition:: And, by the way... - - You can make up your own admonition too. - - :field1: autre def1 - :field2: autre def2 - -.. Attention:: All your base are belong to us. - You can make - -.. WARNING::The "raw" role is a stop-gap measure allowing the author to bypass:: - reStructuredText's markup. It is a "power-user" feature that - should not be overused or abused. The use of "raw" ties documents - to specific output formats and makes them less portable. - - If you often need to use "raw"-derived interpreted text roles or - the "raw" directive, that is a sign either of overuse/abuse or that - functionality may be missing from reStructuredText. Please - describe your situation in a message to the Docutils-users mailing - list. - - -.. admonition:: The "raw" role is a stop-gap measure allowing the author to bypass:: - reStructuredText's markup. It is a "power-user" feature that - should not be overused or abused. The use of "raw" ties documents - to specific output formats and makes them less portable. - - If you often need to use "raw"-derived interpreted text roles or - the "raw" directive, that is a sign either of overuse/abuse or that - functionality may be missing from reStructuredText. Please - describe your situation in a message to the Docutils-users mailing - list. - - - -.. Attention:: Derrière toi c'est horrible ! - - -.. admonition:: Ceci est un avertissement. - - Je vous demande de vous arrêtez. - -BLOCK QUOTE ------------ - -As a great paleontologist once said, - - This theory, that is mine, is mine. - - -- Anne Elk (Miss) - -DOCTEST BLOCK -------------- - ->>> print 'this is a Doctest block' -this is a Doctest block - -LINE BLOC ---------- - -| A one, two, a one two three four -| -| Half a bee, philosophically, -| must, *ipso facto*, half not be. -| But half the bee has got to be, -| *vis a vis* its entity. D'you see? -| -| But can a bee be said to be -| or not to be an entire bee, -| when half the bee is not a bee, -| due to some ancient injury? -| -| Singing... - -SIDEBAR -------- - -.. sidebar:: Title - :subtitle: If Desired - - Body. - -TOPIC ------ - -.. topic:: Title - - Body. - -.. header:: Ceci est une page de test - -.. footer:: Cree par **LETELLIER Sylvain** - -OPTION ------- - --a command-line option "a" --1 file, --one=file, --two file - Multiple options with arguments. - -FOOTNOTES ---------- - -[#]_ is a reference to footnote 1, and [#]_ is a reference to -footnote 2. - -.. [#] This is footnote 1. -.. [#] This is footnote 2. -.. [#] This is footnote 3. - -[#]_ is a reference to footnote 3. - -HYPERLINK ---------- - -it's an anonymous-hyperlink__ and this one is an simple hyperlink_ - -__ anonymous-hyperlink - -.. _hyperlink: www.google.fr - -COMMENT -------- - -.. - Ceci est un commentaire - -INLINE ------- - -``literal``, *emphasis*, **STRONG**, http://www.reference.com, letellier@codelutin.com - - -la derniere ligne. - - - - - Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/textHeader.rst =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/textHeader.rst 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/textHeader.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -1,13 +0,0 @@ -:authors: Benjamin POUSSIN <poussin@codelutin> ; Sylvain LETELLIER <letellier@codelutin> -:organization: Code Lutin -:address: 6 chemin des Orans - 44240 La Chapelle sur Erdre -:version: 2.1 -:status: a finir -:revision: 51 -:date: $date: 28/10/2006$ -:Un champs: au milieu - de null part - - avec meme un para -:copyright: � 2007. JRST - Code Lutin - GPL Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/textLiteral.txt =================================================================== --- trunk/jrst2/src/test/org/codelutin/jrst/textLiteral.txt 2008-08-26 17:22:01 UTC (rev 184) +++ trunk/jrst2/src/test/java/org/codelutin/jrst/textLiteral.txt 2008-08-27 12:57:01 UTC (rev 185) @@ -1,21 +0,0 @@ -private Element composeInclude(Element item) throws Exception { - String option = item.attributeValue("option"); - String path = item.getText(); - Element result = null; - if (option.equals("litteral")){ - result=DocumentHelper.createElement("LITERAL_BLOCK"); - FileReader reader = new FileReader(path); - BufferedReader bf = new BufferedReader(reader); - String line = bf.readLine(); - while (line!=null) - line += "\n"+bf.readLine(); - result.setText(line); - } - else{ - JRSTReader reader = new JRSTReader(); - FileReader in = new FileReader(path); - Document doc = reader.read(in); - result.appendContent(doc.getRootElement()); - } - return result; -} \ No newline at end of file Deleted: trunk/jrst2/src/test/java/org/codelutin/jrst/xmlunit-1.1beta1.jar =================================================================== (Binary files differ) Copied: trunk/jrst2/src/test/resources/comparePython.xml (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/comparePython.xml) =================================================================== --- trunk/jrst2/src/test/resources/comparePython.xml (rev 0) +++ trunk/jrst2/src/test/resources/comparePython.xml 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,279 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE document PUBLIC "+//IDN docutils.sourceforge.net//DTD Docutils Generic//EN//XML" "http://docutils.sourceforge.net/docs/ref/docutils.dtd"> +<!-- Generated by Docutils 0.3.7 --> +<document id="parseur-restructuredtext-le-jrst" name="parseur restructuredtext : le jrst" source="/home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/frEntier.rst"><title>Parseur reStructuredText : le JRst</title><docinfo><author>Sylvain LETELLIER <<reference refuri="mailto:letellier@codelutin">letellier@codelutin</reference>></author><organization>Code Lutin</organization><date>$date: 01/06/2007$</date><copyright>© 2007. JRST - Code Lutin - GPL</copyright></docinfo><topic class="contents" id="sommaire" name="sommaire"><title>Sommaire</title><bullet_list class="auto-toc"><list_item><paragraph><reference id="id25" refid="documentation-utilisateur"><generated class="sectnum">1 </generated>Documentation utilisateur</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id26" refid="pr-sentation"><generated class="sectnum">1.1 </generated>Présentation</reference></paragraph></list_item><list_item><paragraph><reference id="id27" refid="usage"><generated class="sectnum">1.2 </generated>Usage</reference></paragraph></list_item><list_item><paragraph><reference id="id28" refid="plugin-maven"><generated class="sectnum">1.3 </generated>Plugin maven</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id29" refid="introduction-restructuredtext"><generated class="sectnum">2 </generated>Introduction à ReStructuredText</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id30" refid="structure"><generated class="sectnum">2.1 </generated>Structure</reference></paragraph></list_item><list_item><paragraph><reference id="id31" refid="styles-de-texte"><generated class="sectnum">2.2 </generated>Styles de texte</reference></paragraph></list_item><list_item><paragraph><reference id="id32" refid="listes"><generated class="sectnum">2.3 </generated>Listes</reference></paragraph></list_item><list_item><paragraph><reference id="id33" refid="pr-formatage"><generated class="sectnum">2.4 </generated>Préformatage</reference></paragraph></list_item><list_item><paragraph><reference id="id34" refid="sections"><generated class="sectnum">2.5 </generated>Sections</reference></paragraph></list_item><list_item><paragraph><reference id="id35" refid="images"><generated class="sectnum">2.6 </generated>Images</reference></paragraph></list_item><list_item><paragraph><reference id="id36" refid="et-ensuite"><generated class="sectnum">2.7 </generated>Et ensuite ?</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id37" refid="le-xsl-extensible-stylesheets-language"><generated class="sectnum">3 </generated>Le XSL (Extensible Stylesheets Language)</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id38" refid="id19"><generated class="sectnum">3.1 </generated>Présentation</reference></paragraph></list_item><list_item><paragraph><reference id="id39" refid="structure-d-un-document-xsl"><generated class="sectnum">3.2 </generated>Structure d'un document XSL</reference></paragraph></list_item><list_item><paragraph><reference id="id40" refid="association-d-une-feuille-xsl-un-document-xml"><generated class="sectnum">3.3 </generated>Association d'une feuille XSL à un document XML</reference></paragraph></list_item><list_item><paragraph><reference id="id41" refid="les-template-rules-r-gles-de-gabarit"><generated class="sectnum">3.4 </generated>Les template rules (règles de gabarit)</reference></paragraph></list_item><list_item><paragraph><reference id="id42" refid="r-f-rences"><generated class="sectnum">3.5 </generated>Références</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id43" refid="documentation-d-veloppeur"><generated class="sectnum">4 </generated>Documentation développeur</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id44" refid="le-diagramme-de-class"><generated class="sectnum">4.1 </generated>Le diagramme de Class</reference></paragraph></list_item><list_item><paragraph><reference id="id45" refid="la-g-n-ration"><generated class="sectnum">4.2 </generated>La génération</reference></paragraph></list_item><list_item><paragraph><reference id="id46" refid="exemple-d-utilisation"><generated class="sectnum">4.3 </generated>Exemple d'utilisation</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id47" refid="fonctionnalit-s-propos-es"><generated class="sectnum">5 </generated>Fonctionnalités proposées</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id48" refid="fonctionnalit-s-implant-es"><generated class="sectnum">5.1 </generated>Fonctionnalités implantées</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id49" refid="element-racine"><generated class="sectnum">5.1.1 </generated>Element racine</reference></paragraph></list_item><list_item><paragraph><reference id="id50" refid="elements-titre"><generated class="sectnum">5.1.2 </generated>Elements titre</reference></paragraph></list_item><list_item><paragraph><reference id="id51" refid="elements-bibliographiques"><generated class="sectnum">5.1.3 </generated>Elements bibliographiques</reference></paragraph></list_item><list_item><paragraph><reference id="id52" refid="elements-de-d-coration"><generated class="sectnum">5.1.4 </generated>Elements de décoration</reference></paragraph></list_item><list_item><paragraph><reference id="id53" refid="elements-structurels"><generated class="sectnum">5.1.5 </generated>Elements structurels</reference></paragraph></list_item><list_item><paragraph><reference id="id54" refid="elements-du-corps"><generated class="sectnum">5.1.6 </generated>Elements du corps</reference></paragraph></list_item><list_item><paragraph><reference id="id55" refid="elements-des-tableaux"><generated class="sectnum">5.1.7 </generated>Elements des tableaux</reference></paragraph></list_item><list_item><paragraph><reference id="id56" refid="elements-de-la-ligne"><generated class="sectnum">5.1.8 </generated>Elements de la ligne</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id57" refid="fonctionnalit-s-non-implant-es"><generated class="sectnum">5.2 </generated>Fonctionnalités non-implantées</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id58" refid="les-diff-rentes-librairies-utilis-es"><generated class="sectnum">6 </generated>Les différentes librairies utilisées</reference></paragraph><bullet_list class="auto-toc"><list_item><paragraph><reference id="id59" refid="dom4j"><generated class="sectnum">6.1 </generated>dom4j</reference></paragraph></list_item><list_item><paragraph><reference id="id60" refid="javax-xml-transform"><generated class="sectnum">6.2 </generated>javax.xml.transform</reference></paragraph></list_item><list_item><paragraph><reference id="id61" refid="sdoc"><generated class="sectnum">6.3 </generated>SDoc</reference></paragraph></list_item><list_item><paragraph><reference id="id62" refid="xmlunit"><generated class="sectnum">6.4 </generated>Xmlunit</reference></paragraph></list_item></bullet_list></list_item><list_item><paragraph><reference id="id63" refid="documentation-externe"><generated class="sectnum">7 </generated>Documentation externe</reference></paragraph></list_item></bullet_list></topic><section id="documentation-utilisateur" name="documentation utilisateur"><title auto="1" refid="id25"><generated class="sectnum">1 </generated>Documentation utilisateur</title><section dupname="présentation" id="pr-sentation"><title auto="1" refid="id26"><generated class="sectnum">1.1 </generated>Présentation</title><paragraph>Le format reStructuredText est un format de description de documents. A l'image +d'autres LaTeX ou DocBook, il peut être décliné en une multitude de formats. Ces +formats souffrent habituellement d'une syntaxe envahissante qui, si elle est +nécessaire pour des documents très spécifiques, devient gênante quand il s'agit +de créer rapidement un document pas trop complexe. RST dispose quant à lui d'une +syntaxe tellement simple qu'elle en devient presque invisible.</paragraph><paragraph>JRST est un parseur RST en Java permettant de créer une représentation en arbre +d'un document. Il devient alors facile de générer une représentation du document +vers différents formats.</paragraph></section><section id="usage" name="usage"><title auto="1" refid="id27"><generated class="sectnum">1.2 </generated>Usage</title><paragraph>Le parser JRST prend un fichier reStructuredText en entré et génère un fichier XML qui pourra ensuite servir à produire divers formats de fichiers grâce à des fichiers XSL de générations. Les formats de sortie disponibles sont le html, le xhtml, le rst, le pdf, le docbook, le odt (Open-Office), le rtf, ou encore le XML.</paragraph><literal_block xml:space="preserve">JRST myfile.rst</literal_block><paragraph>Cette commande aura pour effet de convertir le fichier myfile.rst en XML qui sera affiché sur la sortie standard (console). +Plusieurs options sont disponibles :</paragraph><option_list><option_list_item><option_group><option><option_string>-o</option_string><option_argument delimiter=" ">file</option_argument></option><option><option_string>--outFile</option_string><option_argument delimiter="=">file</option_argument></option></option_group><description><paragraph>pour rediriger la sortie vers un fichier.</paragraph></description></option_list_item><option_list_item><option_group><option><option_string>-t</option_string><option_argument delimiter=" ">format</option_argument></option><option><option_string>--outType</option_string><option_argument delimiter=" ">format</option_argument></option></option_group><description><paragraph>pour préciser un format de sortie, donc utiliser un fichier XSL de génération. Plusieurs formats sont disponibles xhtml, docbook, xml, html, xdoc, rst, pdf, odt, rtf.</paragraph></description></option_list_item><option_list_item><option_group><option><option_string>-x</option_string><option_argument delimiter=" ">xslFile</option_argument></option><option><option_string>--xslFile</option_string><option_argument delimiter=" ">xslFile</option_argument></option></option_group><description><paragraph>sert à préciser le fichier xsl de génération à utiliser.</paragraph></description></option_list_item><option_list_item><option_group><option><option_string>--force</option_string></option></option_group><description><paragraph>forcer l'écriture d'un fichier, si le fichier de sortie existe, il sera remplacé.</paragraph></description></option_list_item><option_list_item><option_group><option><option_string>--help</option_string></option></option_group><description><paragraph>pour afficher les options disponibles :</paragraph></description></option_list_item></option_list><literal_block xml:space="preserve">Usage: [options] FILE + [--force] : overwrite existing out file + [--help] : display this help and exit + [--outFile -o value] : Output file + [--outType -t /xhtml|docbook|xml|html|xdoc|rst/] : Output type + [--xslFile -x value] : XSL file list to apply, comma separated</literal_block><paragraph>ex :</paragraph><literal_block xml:space="preserve">JRST --force -t html -o myfile.html myfile.rst</literal_block><paragraph>Cette commande produira un fichier html (myfile.html) à partir du fichier reStructuredText (myfile.rst) même si myfile.html existe déjà.</paragraph></section><section id="plugin-maven" name="plugin maven"><title auto="1" refid="id28"><generated class="sectnum">1.3 </generated>Plugin maven</title><paragraph>Un plugin maven est disponnible à l'adresse suivante +<reference refuri="http://jrst.labs.libre-entreprise.org/maven-jrst-plugin">http://jrst.labs.libre-entreprise.org/maven-jrst-plugin</reference>. Il permet l'utilisation +depuis maven de JRst.</paragraph></section></section><section id="introduction-restructuredtext" name="introduction à restructuredtext"><title auto="1" refid="id29"><generated class="sectnum">2 </generated>Introduction à ReStructuredText</title><paragraph>Document adaptée du document de Richard Jones : <reference refuri="http://docutils.sourceforge.net/sandbox/wilk/french/quickstart-fr.html">http://docutils.sourceforge.net/sandbox/wilk/french/quickstart-fr.html</reference></paragraph><paragraph>Ce texte contient des liens de la forme "(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html">quickref</reference>)". Ils sont +relatifs au manuel de référence utilisateur <reference name="Quick reStructuredText" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html">Quick reStructuredText</reference>. +S'ils ne fonctionnent pas, référez vous au document <reference name="master quick reference" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html">master quick +reference</reference>.</paragraph><target anonymous="1" id="id1" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html"/><target id="quick-restructuredtext" name="quick restructuredtext" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html"/><target id="master-quick-reference" name="master quick reference" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html"/><section id="structure" name="structure"><title auto="1" refid="id30"><generated class="sectnum">2.1 </generated>Structure</title><paragraph>Pour commencer, il me semble que "Structured Text" n'est pas tout à fait la +bonne appellation. Nous devrions plutôt le nommer "Relaxed Text" qui contient +quelques schémas logiques. Ces schémas sont interprétés par un convertisseur +HTML pour produire "Very Structured Text" (un texte très structuré) qui pourra +être utilisé par un navigateur web.</paragraph><paragraph>Le schéma le plus simple est le <strong>paragraphe</strong> (<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#paragraphs">quickref</reference>). +C'est un bloc de texte séparé par des lignes vides (une seule suffit). +Les paragraphes doivent avoir le même décalage -- c'est à dire des espaces +à gauche. Ces paragraphes produiront un texte décalé. Par exemple:</paragraph><literal_block xml:space="preserve">Ceci est un paragraphe. +Très court. + + Le texte de ce paragraphe sera décalé, + généralement utilisé pour des citations. + +En voilà un autre</literal_block><paragraph>Le résultat donne :</paragraph><block_quote><paragraph>Ceci est un paragraphe. +Très court.</paragraph><block_quote><paragraph>Le texte de ce paragraphe sera décalé, +généralement utilisé pour des citations.</paragraph></block_quote><paragraph>En voilà un autre</paragraph></block_quote><target anonymous="1" id="id2" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#paragraphs"/></section><section id="styles-de-texte" name="styles de texte"><title auto="1" refid="id31"><generated class="sectnum">2.2 </generated>Styles de texte</title><paragraph>(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#inline-markup">quickref</reference>)</paragraph><target anonymous="1" id="id3" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#inline-markup"/><paragraph>Dans les paragraphes et le corps du texte, nous pouvons utiliser +des marqueurs pour <emphasis>italique</emphasis> avec "`` <emphasis>italique</emphasis> <literal>" ou **gras** +avec "</literal> <strong>gras</strong> <problematic id="id5" refid="id4">``</problematic>".</paragraph><system_message backrefs="id5" id="id4" level="2" line="136" source="/home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/frEntier.rst" type="WARNING"><paragraph>Inline literal start-string without end-string.</paragraph></system_message><paragraph>Notez qu'aucun traitement supplémentaire n'est apporté entre deux +doubles apostrophes inversées -- les astérisques, comme dans "`` * <problematic id="id7" refid="id6">``</problematic>", +sont donc conservées en l'état.</paragraph><system_message backrefs="id7" id="id6" level="2" line="140" source="/home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/frEntier.rst" type="WARNING"><paragraph>Inline literal start-string without end-string.</paragraph></system_message><paragraph>Si vous souhaitez utiliser un de ces caractères "spéciaux" dans +le texte, il n'y a généralement pas de problème -- reStructuredText +est assez malin. +Par exemple, cet astérisque <literal>*</literal> est traité correctement. Si vous +souhaitez par contre <literal>*``entourer un texte par des astérisques``*</literal> +<strong>sans</strong> qu'il soit en italique, il est nécessaire d'indiquer que +l'astérisque ne doit pas être interprété. Pour cela il suffit de placer +une barre oblique inversée juste avant lui, comme ça "<literal>\*</literal>" (<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#escaping">quickref</reference>), ou +en l'entourant de doubles apostrophes inversées (litteral), comme cela</paragraph><literal_block xml:space="preserve">``\*``</literal_block><paragraph>(<literal>\*</literal> n'est pas implanté dans le JRST seul les `` fonctionnent)</paragraph><target anonymous="1" id="id8" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#escaping"/></section><section id="listes" name="listes"><title auto="1" refid="id32"><generated class="sectnum">2.3 </generated>Listes</title><paragraph>Il y a trois types de listes: <strong>numérotées</strong>, <strong>avec puces</strong> et +de <strong>définitions</strong>. Dans chaque cas, nous pouvons avoir autant +de paragraphes, sous-listes, etc. que l'on souhaite, tant que +le décalage à gauche est aligné sur la première ligne.</paragraph><paragraph>Les listes doivent toujours démarrer un nouveau paragraphe +-- c'est à dire qu'il doit y avoir un saut de ligne juste avant.</paragraph><paragraph>Listes <strong>numérotées</strong> (par des nombres, lettres, chiffres romains; +<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#enumerated-lists">quickref</reference>)</paragraph><target anonymous="1" id="id9" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#enumerated-lists"/><block_quote><paragraph>En démarrant une ligne avec un numéro ou une lettre suivie d'un +point ".", une parenthèse droite ")" ou entouré par des parenthèses +-- comme vous préférez. Toutes ces formes sont reconnues:</paragraph><literal_block xml:space="preserve">1. nombres + +A. Lettres en majuscule + qui continue sur plusieurs ligne + + avec deux paragraphes et tout ! + +a. lettres minuscules + + 3. avec une sous-liste qui démarre à un nombre différent + 4. faites attention à garder une séquence de nombre correcte ! + +I. majuscules en chiffres romains + +i. minuscules en chiffres romains + +(1) des nombres à nouveau + +1) et encore</literal_block><paragraph>Le résultat (note : Tous les styles de listes ne sont pas toujours +supportés par tous les navigateurs, vous ne verrez donc pas forcément +les effets complets) :</paragraph><block_quote><enumerated_list enumtype="arabic" prefix="" suffix="."><list_item><paragraph>nombres</paragraph></list_item></enumerated_list><enumerated_list enumtype="upperalpha" prefix="" suffix="."><list_item><paragraph>Lettres en majuscule +qui continue sur plusieurs ligne</paragraph><paragraph>avec deux paragraphes et tout !</paragraph></list_item></enumerated_list><enumerated_list enumtype="loweralpha" prefix="" suffix="."><list_item><paragraph>lettres minuscules</paragraph><enumerated_list enumtype="arabic" prefix="" start="3" suffix="."><list_item><paragraph>avec une sous-liste qui démarre à un nombre différent</paragraph></list_item><list_item><paragraph>faites attention à garder une séquence de nombre correcte !</paragraph></list_item></enumerated_list></list_item></enumerated_list><enumerated_list enumtype="upperroman" prefix="" suffix="."><list_item><paragraph>majuscules en chiffres romains</paragraph></list_item></enumerated_list><enumerated_list enumtype="lowerroman" prefix="" suffix="."><list_item><paragraph>minuscules en chiffres romains</paragraph></list_item></enumerated_list><enumerated_list enumtype="arabic" prefix="(" suffix=")"><list_item><paragraph>des nombres à nouveau</paragraph></list_item></enumerated_list><enumerated_list enumtype="arabic" prefix="" suffix=")"><list_item><paragraph>et encore</paragraph></list_item></enumerated_list></block_quote></block_quote><paragraph>Listes <strong>à puces</strong> (<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#bullet-lists">quickref</reference>)</paragraph><target anonymous="1" id="id10" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#bullet-lists"/><block_quote><paragraph>De la même manière que pour les listes numérotées, il faut démarrer +la première ligne avec une puce -- soit "-", "+" ou "*":</paragraph><literal_block xml:space="preserve">* une puce "*" + + - une sous-liste avec "-" + + + à nouveau une sous-liste + + - une autre option</literal_block><paragraph>Le résultat:</paragraph><block_quote><bullet_list bullet="*"><list_item><paragraph>une puce "*"</paragraph><bullet_list bullet="-"><list_item><paragraph>une sous-liste avec "-"</paragraph><block_quote><bullet_list bullet="+"><list_item><paragraph>à nouveau une sous-liste</paragraph></list_item></bullet_list></block_quote></list_item><list_item><paragraph>une autre option</paragraph></list_item></bullet_list></list_item></bullet_list></block_quote></block_quote><paragraph>Les listes de <strong>définitions</strong> (<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#definition-lists">quickref</reference>)</paragraph><target anonymous="1" id="id11" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#definition-lists"/><block_quote><paragraph>Comme les deux autres, les listes de définitions consistent en un +terme et la définition de ce terme. Le format est le suivant:</paragraph><literal_block xml:space="preserve">Quoi + Les listes de définitions associent un terme avec une définition. + +*Comment* + Le terme est une phrase d'une ligne, et la définition est d'un + ou plusieurs paragraphes ou éléments, décalés par rapport au terme. + Les lignes vides ne sont pas autorisées entre le terme et la définition.</literal_block><paragraph>Le résultat:</paragraph><block_quote><definition_list><definition_list_item><term>Quoi</term><definition><paragraph>Les listes de définitions associent un terme avec une définition.</paragraph></definition></definition_list_item><definition_list_item><term><emphasis>Comment</emphasis></term><definition><paragraph>Le terme est une phrase d'une ligne, et la définition est d'un +ou plusieurs paragraphes ou éléments, décalés par rapport au terme. +Les lignes vides ne sont pas autorisées entre le terme et la définition.</paragraph></definition></definition_list_item></definition_list></block_quote></block_quote></section><section id="pr-formatage" name="préformatage"><title auto="1" refid="id33"><generated class="sectnum">2.4 </generated>Préformatage</title><paragraph>(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#literal-blocks">quickref</reference>)</paragraph><target anonymous="1" id="id12" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#literal-blocks"/><paragraph>Pour inclure un texte préformaté sans traitement +il suffit de terminer le paragraphe par "<literal>::</literal>". Le texte préformaté est +terminé lorsqu'une ligne retombe au niveau du décalage précédent. Par exemple:</paragraph><literal_block xml:space="preserve">Un exemple:: + + Espaces, nouvelles lignes, lignes vides, et toutes sortes de marqueurs + (comme *ceci* ou \cela) sont préservés dans les bloc préformatés. + + Regardez ici, je suis descendu d'un niveau. + (mais pas assez) + +Fin de l'exemple</literal_block><paragraph>Le résultat:</paragraph><block_quote><paragraph>Un exemple:</paragraph><literal_block xml:space="preserve"> Espaces, nouvelles lignes, lignes vides, et toutes sortes de marqueurs + (comme *ceci* ou \cela) sont préservés dans les bloc préformatés. + +Regardez ici, je suis descendu d'un niveau. +(mais pas assez)</literal_block><paragraph>Fin de l'exemple</paragraph></block_quote><paragraph>Notez que si le paragraphe contient seulement "<literal>::</literal>", il est ignoré.</paragraph><block_quote><literal_block xml:space="preserve">Ceci est un texte préformaté, +le paragraphe "::" est ignoré.</literal_block></block_quote></section><section id="sections" name="sections"><title auto="1" refid="id34"><generated class="sectnum">2.5 </generated>Sections</title><paragraph>(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#section-structure">quickref</reference>)</paragraph><target anonymous="1" id="id13" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#section-structure"/><paragraph>Pour diviser un texte en plusieurs sections, nous utilisons des +<strong>en-têtes de section</strong>. C'est à dire une seule ligne de texte (d'un +ou plusieurs mots) avec un ornement : juste en dessous et éventuellement +dessus aussi, avec des tirets "<literal>-----</literal>", égal "<literal>=====</literal>", tildes +"<literal>~~~~~</literal>" ou n'importe quel de ces caractères <literal>= - ` : ' " ~ ^ _ * + # < ></literal> +qui vous semble convenir. Un ornement simplement en dessous n'a pas la +même signification qu'un ornement dessus-dessous avec le même caractère. +Les ornements doivent avoir au moins la taille du texte. Soyez cohérent, +les ornements identiques sont censés être du même niveau:</paragraph><literal_block xml:space="preserve">Chapitre 1 +========== + +Section 1.1 +----------- + +Sous-section 1.1.1 +~~~~~~~~~~~~~~~~~~ + +Section 1.2 +----------- + +Chapitre 2 +==========</literal_block><paragraph>Le résultat de cette structure, sous la forme pseudo-XML:</paragraph><literal_block xml:space="preserve"><section> + <title> + Chapitre 1 + <section> + <title> + Section 1.1 + <section> + <title> + Sous-section 1.1.1 + <section> + <title> + Section 1.2 +<section> + <title> + Chapitre 2</literal_block><paragraph>(Pseudo-XML utilise une indentation et n'as pas de balises finale. Il +n'est pas possible de montrer le résultat, comme dans les autres exemples, +du fait que les sections ne peuvent être utilisées à l'intérieur d'un +paragraphe décalé. Pour un exemple concret, comparez la structure de +ce document avec le résultat.)</paragraph><paragraph>Notez que les en-têtes de section sont utilisable comme cible de liens, +simplement en utilisant leur nom. Pour créer un lien sur la section <reference name="Listes" refid="listes">Listes</reference>, +j'écris "<literal>Listes_</literal>". Si le titre comporte des espaces, il est nécessaire +d'utiliser les doubles apostrophes inversées "<literal>`Styles de texte`_</literal>".</paragraph><paragraph>Pour indiquer le titre du document, utilisez un style d'ornement unique +en début de document. Pour indiquer un sous-titre de document, utilisez +un autre ornement unique juste après le titre. +Par exemple:</paragraph><literal_block xml:space="preserve">================= +Titre du document +================= +---------- +Sous-titre +---------- + +Titre de la section +=================== + +...</literal_block><paragraph>Notez que "Titre du document" et "Titre de la section" utilisent le signe +égal, mais sont différents et sans relation. Le texte et l'ornement peuvent +être de la même taille pour des questions d'esthétisme.</paragraph></section><section id="images" name="images"><title auto="1" refid="id35"><generated class="sectnum">2.6 </generated>Images</title><paragraph>(<reference anonymous="1" name="quickref" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#directives">quickref</reference>)</paragraph><target anonymous="1" id="id14" refuri="http://docutils.sourceforge.net/docs/rst/quickref.html#directives"/><paragraph>Pour inclure une image dans votre document, vous devez utiliser la <reference anonymous="1" name="directive" refuri="http://docutils.sourceforge.net/spec/rst/directives.html">directive</reference> +<literal>image</literal>. +Par exemple:</paragraph><literal_block xml:space="preserve">.. image:: biohazard.png</literal_block><paragraph>Le résultat:</paragraph><image uri="biohazard.png"/><paragraph>La partie <literal>images/biohazard.png</literal> indique le chemin d'accès au fichier +de l'image qui doit apparaître. Il n'y a pas de restriction sur l'image +(format, taille etc). Si l'image doit apparaître en HTML et que vous +souhaitez lui ajouter des informations:</paragraph><literal_block xml:space="preserve">.. image:: biohazard.png + :height: 100 + :width: 200 + :scale: 50 + :alt: texte alternatif</literal_block><paragraph>Consultez la <reference anonymous="1" name="documentation" refuri="http://docutils.sourceforge.net/spec/rst/directives.html#images">documentation</reference> complète de la directive image pour plus d'informations.</paragraph><target anonymous="1" id="id15" refuri="http://docutils.sourceforge.net/spec/rst/directives.html"/><target anonymous="1" id="id16" refuri="http://docutils.sourceforge.net/spec/rst/directives.html#images"/></section><section id="et-ensuite" name="et ensuite ?"><title auto="1" refid="id36"><generated class="sectnum">2.7 </generated>Et ensuite ?</title><paragraph>Cette introduction montre les possibilités les plus courantes de reStructuredText, +mais il y en a bien d'autres à explorer. Le manuel de référence utilisateur +'Quick reStructuredText`_ est recommandé pour aller plus loin. Pour les détails complets +consultez <reference name="reStructuredText Markup Specification" refuri="http://docutils.sourceforge.net/spec/rst/reStructuredText.html">reStructuredText Markup Specification</reference> <footnote_reference auto="1" id="id17" refid="id18">1</footnote_reference>.</paragraph><footnote auto="1" backrefs="id17" id="id18" name="1"><label>1</label><paragraph>Si ce lien relatif ne fonctionne pas, consultez le document principal: +<reference refuri="http://docutils.sourceforge.net/spec/rst/reStructuredText.html">http://docutils.sourceforge.net/spec/rst/reStructuredText.html</reference>.</paragraph></footnote><target id="restructuredtext-markup-specification" name="restructuredtext markup specification" refuri="http://docutils.sourceforge.net/spec/rst/reStructuredText.html"/><target id="poster-un-message" name="poster un message" refuri="mailto:docutils-users@lists.sourceforge.net"/><target id="docutils-users-mailing-list" name="docutils-users mailing list" refuri="http://lists.sourceforge.net/lists/listinfo/docutils-users"/><target id="docutils-project-web-site" name="docutils project web site" refuri="http://docutils.sourceforge.net/"/></section></section><section id="le-xsl-extensible-stylesheets-language" name="le xsl (extensible stylesheets language)"><title auto="1" refid="id37"><generated class="sectnum">3 </generated>Le XSL (Extensible Stylesheets Language)</title><section dupname="présentation" id="id19"><title auto="1" refid="id38"><generated class="sectnum">3.1 </generated>Présentation</title><paragraph>XML est un langage de structuration des données, et non de représentation des données. Ainsi XSL +(eXtensible StyleSheet Language) est un langage recommandé par le W3C pour effectuer la représentation +des données de documents XML. XSL est lui-même défini avec le formalisme XML, cela signifie qu'une +feuille de style XSL est un document XML bien formé.</paragraph><paragraph>XSL est un langage permettant de définir des feuilles de style pour les documents XML au même titre que +les CSS (Cascading StyleSheets) pour le langage HTML ou bien DSSSL (Document Style Semantics and +Specification Language) pour le SGML. XSL est d'ailleurs inspiré de DSSSL dont il reprend beaucoup +de fonctionnalités et est compatible avec les CSS (il s'agit d'un sur-ensemble des CSS).</paragraph><paragraph>Toutefois, contrairement aux CSS, XSL permet aussi de retraiter un document XML afin d'en modifier totalement +sa structure, ce qui permet à partir d'un document XML d'être capable de générer d'autres types de documents +(PostScript, HTML, Tex, RTF, ...) ou bien un fichier XML de structure différente.</paragraph><paragraph>Ainsi la structuration des données (définie par XML) et leur représentation (définie par un langage tel que +XSL) sont séparées. Cela signifie qu'il est possible à partir d'un document XML de créer des documents +utilisant différentes représentations (HTML pour créer des pages web, WML pour les mobiles WAP, ...).</paragraph><paragraph><image alt="presentationxsl" uri="presentationXSL.png"/></paragraph></section><section id="structure-d-un-document-xsl" name="structure d'un document xsl"><title auto="1" refid="id39"><generated class="sectnum">3.2 </generated>Structure d'un document XSL</title><paragraph>Un document XSL étant un document XML, il commence obligatoirement par la balise suivante:</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?></literal_block><paragraph>D'autre part, toute feuille de style XSL est comprise entre les balises <xsl:stylesheet ...> et </xsl:stylesheet>.</paragraph><paragraph>La balise xsl:stylesheet encapsule des balises xsl:template définissant les transformations à faire subir à certains +éléments du document XML.</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet +xmlns:xsl="http://www.w3.org/TR/WD-xsl" +xmlns="http://www.w3.org/TR/REC-html40" +result-ns=""> + <xsl:template ... > + <!-- traitements à effectuer --> + </xsl:template > +</xsl:stylesheet></literal_block></section><section id="association-d-une-feuille-xsl-un-document-xml" name="association d'une feuille xsl à un document xml"><title auto="1" refid="id40"><generated class="sectnum">3.3 </generated>Association d'une feuille XSL à un document XML</title><paragraph>Une feuille de style XSL (enregistré dans un fichier dont l'extension est .xsl) peut être liée à un document +XML (de telle manière à ce que le document XML utilise la feuille XSL) en insérant la balise suivante au début +du document XML:</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet href="fichier.xsl" type="text/xsl"?></literal_block></section><section id="les-template-rules-r-gles-de-gabarit" name="les template rules (règles de gabarit)"><title auto="1" refid="id41"><generated class="sectnum">3.4 </generated>Les template rules (règles de gabarit)</title><paragraph>Les template rules sont des balises XSL permettant de définir des opérations à réaliser sur certains éléments +du document XML utilisant la page XSL, c'est-à-dire généralement de transformer un tag XML en au moins un tag +HTML (généralement plusieurs).</paragraph><paragraph>Ainsi le tag XML suivant:</paragraph><literal_block xml:space="preserve"><personne> + <nom>Pillou</nom> + <prenom>Jean-François</prenom> +</personne> +<personne> + <nom>VanHaute</nom> + <prenom>Nico</prenom> +</personne> +<personne> + <nom>Andrieu</nom> + <prenom>Seb</prenom> +</personne></literal_block><paragraph>pourra être transformé en les tags HTML suivants:</paragraph><literal_block xml:space="preserve"><ul> + <li>Pillou - Jean-François</li> + <li>VanHaute - Nico</li> + <li>Andrieu - Seb</li> +</ul></literal_block><paragraph>L'attribut "match" de la balise <xsl:template> permet de définir (grâce à la notation XPath) le ou les éléments +du document XML sur lesquels s'applique la transformation.</paragraph><paragraph>La notation Xpath permet de définir des patterns, c'est-à-dire des chaînes de caractères permettant de repérer +un noeud dans le document XML. Les principaux patterns sont :</paragraph><table><tgroup cols="3"><colspec colwidth="7"/><colspec colwidth="13"/><colspec colwidth="65"/><thead><row><entry><paragraph>Pattern</paragraph></entry><entry><paragraph>Exemple</paragraph></entry><entry><paragraph>Signification</paragraph></entry></row></thead><tbody><row><entry><paragraph><literal>|</literal></paragraph></entry><entry><paragraph>Gauche|Milieu</paragraph></entry><entry><paragraph>Indique une alternative (un noeud ou bien l'autre (ou les deux))</paragraph></entry></row><row><entry><paragraph>/</paragraph></entry><entry><paragraph>personne/nom</paragraph></entry><entry><paragraph>Chemin d'accès aux éléments (personne/bras/gauche)</paragraph></entry></row><row><entry><bullet_list bullet="*"><list_item/></bullet_list></entry><entry><bullet_list bullet="*"><list_item/></bullet_list></entry><entry><paragraph>Motif "joker" désignant n'importe quel élément</paragraph></entry></row><row><entry><paragraph>//</paragraph></entry><entry><paragraph>//personne</paragraph></entry><entry><paragraph>Indique tous les descendants d'un noeud</paragraph></entry></row><row><entry><paragraph>.</paragraph></entry><entry><paragraph>.</paragraph></entry><entry><paragraph>Caractérise le noeud courant</paragraph></entry></row><row><entry><paragraph><literal>..</literal></paragraph></entry><entry><paragraph><literal>..</literal></paragraph></entry><entry><paragraph>Désigne le noeud parent</paragraph></entry></row><row><entry><paragraph>@</paragraph></entry><entry><paragraph>@valeur</paragraph></entry><entry><paragraph>Indique un attribut caractéristique</paragraph></entry></row></tbody></tgroup></table><paragraph>La transformation peut être réalisée :</paragraph><bullet_list bullet="-"><list_item><paragraph>soit par ajout de texte,</paragraph></list_item><list_item><paragraph>soit en définissant des éléments de transformation, c'est-à-dire des éléments permettant de définir +des règles de transformation à appliquer aux éléments sélectionnés par l'attribut match</paragraph></list_item></bullet_list><paragraph>Voici un exemple de feuille XSL permettant d'effectuer la transformation XML vers HTML décrite ci-dessus:</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet +xmlns:xsl="http://www.w3.org/TR/WD-xsl" +xmlns="http://www.w3.org/TR/REC-html40" +result-ns=""> + <xsl:template match="/"> + <HTML> + <HEAD> + <TITLE>Titre de la page</TITLE> + </HEAD> + <BODY BGCOLOR="#FFFFFF"> + <xsl:apply-templates/> + </BODY> + </HTML> + </xsl:template > + <xsl:template match="personne" > + <ul> + <li> + <xsl:value-of select="nom"/> + - + <xsl:value-of select="prenom"/> + </li> + </ul> + </xsl:template > +</xsl:stylesheet></literal_block><paragraph>Voici la signification de cette feuille XSL :</paragraph><bullet_list bullet="*"><list_item><paragraph>Le premier tag <xsl:template> permet d'appliquer une transformation à l'ensemble du document (la valeur +"/" de l'attribut match indique l'élément racine du document XML). Ce tag contient des balises HTML qui +seront transmises dans l'arbre résultat.</paragraph></list_item><list_item><paragraph>L'élément <xsl:apply-templates/> indique le traitement de tous les enfants directs de la racine.</paragraph></list_item><list_item><paragraph>La balise <xsl:template match="personne"> permet d'aller traiter les éléments de type personne.</paragraph></list_item><list_item><paragraph>Enfin les deux éléments <xsl:value-of select="nom"/> et <xsl:value-of select="prenom"/> permettent de +recuperer les valeurs des balises nom et prenom.</paragraph></list_item></bullet_list></section><section id="r-f-rences" name="références"><title auto="1" refid="id42"><generated class="sectnum">3.5 </generated>Références</title><bullet_list bullet="-"><list_item><paragraph>Article : <reference refuri="http://www.commentcamarche.net/xml/xmlxsl.php3">http://www.commentcamarche.net/xml/xmlxsl.php3</reference></paragraph></list_item><list_item><paragraph>Schéma : <reference refuri="http://fr.wikipedia.org/wiki/Extended_stylesheet_language_transformations">http://fr.wikipedia.org/wiki/Extended_stylesheet_language_transformations</reference></paragraph></list_item></bullet_list><substitution_definition name="presentationxsl"><image alt="presentationxsl" uri="presentationXSL.png"/></substitution_definition></section></section><section id="documentation-d-veloppeur" name="documentation développeur"><title auto="1" refid="id43"><generated class="sectnum">4 </generated>Documentation développeur</title><section id="le-diagramme-de-class" name="le diagramme de class"><title auto="1" refid="id44"><generated class="sectnum">4.1 </generated>Le diagramme de Class</title><paragraph><image alt="classDiagramme" uri="DiagrammeClass.png"/></paragraph><definition_list><definition_list_item><term>La Class <strong>AdvancedReader</strong> à pour fonction de faciliter la lecture du fichier RST grâce à différentes méthodes :</term><definition><bullet_list bullet="-"><list_item><paragraph>String readLine() : renvoie une ligne</paragraph></list_item><list_item><paragraph>String[] readLines(int nombresLigne) : renvoie un certain nombre de lignes</paragraph></list_item><list_item><paragraph>Stringn[] readWhile(Pattern p) : renvoie les lignes tant qu'elles correspondent au pattern</paragraph></list_item></bullet_list></definition></definition_list_item></definition_list><paragraph>...</paragraph><paragraph>La Class <strong>JRSTLexer</strong> utilise <strong>AdvancedReader</strong> pour construire un fichier XML, il parcours l'ensemble du document pour isoler les types de données, leurs paramètres et leurs contenus, donc rassembler toutes les informations utiles à la mise en forme du XML final. Il va commencer par l'entête du document (peekHeader(), peekDocInfo()) pour ensuite s'intéresser au corps (peekBody()).</paragraph><paragraph>La Class <strong>JRSTReader</strong> utilise <strong>JRSTLexer</strong>, il interprète le XML qui lui est renvoyé pour construire le XML final. Celui-ci est conforme à la DTD définie par <reference name="DocUtils" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html">DocUtils</reference>. Cette Class à parfois besoin de s'appeler elle même lorsque une partie du document doit être interprétée indépendamment du reste. Par exemple, s'il y a une liste dans une case d'un tableau, l'on extrait les informations de la case et on les interprètes, le contenu d'une admoniton (une note) doit lui aussi être considéré comme un document indépendant. Lorsque la génération est terminée, la Class compose le sommaire (composeContent()) puis s'occupe de toutes les spécificités « inline » (inline()), comme par exemple les mots en italique ou gras, les références, les footnotes... Tout ce qui peut apparaître à l'intérieur d'une ligne.</paragraph><paragraph>La Class <strong>reStructuredText</strong> référence toutes les variables nécessaires à la génération du XML final.</paragraph><paragraph>La Class <strong>JRST</strong> contient la méthode main(), elle gère les options, la lecture et l'écriture des fichiers. Elle lit le document, le parse grâce à la class <strong>JRSTReader</strong> puis applique le XSL désiré (si besoin) grâce à la class <strong>JRSTGenerator</strong>.</paragraph></section><section id="la-g-n-ration" name="la génération"><title auto="1" refid="id45"><generated class="sectnum">4.2 </generated>La génération</title><paragraph><image alt="diagrammegeneration" uri="DiagrammeGeneration.png"/></paragraph><paragraph>Référence :</paragraph><bullet_list bullet="-"><list_item><paragraph>xml2rst.xsl (convertion de xml de docutils vers rst) : <reference refuri="http://www.merten-home.de/FreeSoftware/xml2rst">http://www.merten-home.de/FreeSoftware/xml2rst</reference></paragraph></list_item><list_item><paragraph>dn2dbk.xsl (convertion de xml de docutils vers docbook) : <reference refuri="http://membres.lycos.fr/ebellot/dn2dbk">http://membres.lycos.fr/ebellot/dn2dbk</reference></paragraph></list_item><list_item><paragraph>les xsl de nwalsh (convertion de docbook vers FO et xhtml) : <reference refuri="http://nwalsh.com">http://nwalsh.com</reference></paragraph></list_item><list_item><paragraph>XMLmind (convertion de FO vers ODT et RTF) : <reference refuri="http://www.xmlmind.com/foconverter/what_is_xfc.html">http://www.xmlmind.com/foconverter/what_is_xfc.html</reference></paragraph></list_item><list_item><paragraph>FOP (convertion de FO vers PDF) : <reference refuri="http://xmlgraphics.apache.org/fop">http://xmlgraphics.apache.org/fop</reference></paragraph></list_item></bullet_list></section><section id="exemple-d-utilisation" name="exemple d'utilisation"><title auto="1" refid="id46"><generated class="sectnum">4.3 </generated>Exemple d'utilisation</title><paragraph>L'on souhaite convertir le document rst (text.rst) suivant en html (text.html) :</paragraph><literal_block xml:space="preserve">===== +Titre +===== + +:Author: Letellier Sylvain + +.. Attention:: texte à être réinterprété comme un fichier rst indépendant</literal_block><paragraph>On utilise donc la commande suivante:</paragraph><literal_block xml:space="preserve">JRST -t html -o text.html text.rst</literal_block><paragraph>Ce diagramme de séquence décrit le fonctionnement du parseur tout au long de la génération :</paragraph><paragraph><image alt="sequanceDiagramme" uri="DiagrammeSequance.png"/></paragraph><paragraph>La Classe <strong>JRSTGenerator</strong>, grâce au fichier XSL rst2xhtml.xsl, renvoie le fichier html suivant:</paragraph><literal_block xml:space="preserve"><?xml version="1.0" encoding="UTF-8"?> +<html xmlns="http://www.w3.org/TR/xhtml1/strict"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> + <title>Titre</title> + </head> + <body> + <h1>Titre</h1> + <table class="docinfo" frame="void" rules="none"> + <col class="docinfo-name"/> + <col class="docinfo-content"/> + <tbody valign="top"> + <tr> + <th class="docpatterninfo-name">author :</th> + <td class="docinfo-content">Letellier Sylvain</td> + </tr> + </tbody> + </table> + <div class="attention"> + <p class="title">attention :</p> + <p class="body"> + <p>texte à être réinterprété comme un fichier rst indépendant</p> + </p> + </div> + </body> +</html></literal_block><paragraph>Qui affiche la page (un CSS à été ajouté pour la mise en forme) :</paragraph><topic><title>Titre</title><field_list><field><field_name>Author</field_name><field_body><paragraph>Letellier Sylvain</paragraph></field_body></field></field_list><system_message level="2" line="708" source="/home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/frEntier.rst" type="WARNING"><paragraph>Field list ends without a blank line; unexpected unindent.</paragraph></system_message><attention><paragraph>texte à être réinterprété comme un fichier rst indépendant</paragraph></attention></topic><target id="docutils" name="docutils" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html"/><substitution_definition name="diagrammegeneration"><image alt="diagrammegeneration" uri="DiagrammeGeneration.png"/></substitution_definition><substitution_definition name="classDiagramme"><image alt="classDiagramme" uri="DiagrammeClass.png"/></substitution_definition><substitution_definition name="sequanceDiagramme"><image alt="sequanceDiagramme" uri="DiagrammeSequance.png"/></substitution_definition></section></section><section id="fonctionnalit-s-propos-es" name="fonctionnalités proposées"><title auto="1" refid="id47"><generated class="sectnum">5 </generated>Fonctionnalités proposées</title><paragraph>La DTD de Docutils : <reference refuri="http://docutils.sourceforge.net/docs/ref/doctree.html">http://docutils.sourceforge.net/docs/ref/doctree.html</reference></paragraph><section id="fonctionnalit-s-implant-es" name="fonctionnalités implantées"><title auto="1" refid="id48"><generated class="sectnum">5.1 </generated>Fonctionnalités implantées</title><section id="element-racine" name="element racine"><title auto="1" refid="id49"><generated class="sectnum">5.1.1 </generated>Element racine</title><bullet_list bullet="-"><list_item><paragraph><reference name="document" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#document">document</reference></paragraph></list_item></bullet_list></section><section id="elements-titre" name="elements titre"><title auto="1" refid="id50"><generated class="sectnum">5.1.2 </generated>Elements titre</title><bullet_list bullet="-"><list_item><paragraph><reference name="subtitle" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#subtitle">subtitle</reference></paragraph></list_item><list_item><paragraph><reference name="title" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#title">title</reference></paragraph></list_item></bullet_list></section><section id="elements-bibliographiques" name="elements bibliographiques"><title auto="1" refid="id51"><generated class="sectnum">5.1.3 </generated>Elements bibliographiques</title><bullet_list bullet="-"><list_item><paragraph><reference name="docinfo" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#docinfo">docinfo</reference></paragraph></list_item><list_item><paragraph><reference name="author" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#author">author</reference></paragraph></list_item><list_item><paragraph><reference name="authors" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#authors">authors</reference></paragraph></list_item><list_item><paragraph><reference name="organization" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#organization">organization</reference></paragraph></list_item><list_item><paragraph><reference name="address" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#address">address</reference></paragraph></list_item><list_item><paragraph><reference name="contact" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#contact">contact</reference></paragraph></list_item><list_item><paragraph><reference name="version" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#version">version</reference></paragraph></list_item><list_item><paragraph><reference name="revision" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#revision">revision</reference></paragraph></list_item><list_item><paragraph><reference name="status" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#status">status</reference></paragraph></list_item><list_item><paragraph><reference name="date" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#date">date</reference></paragraph></list_item><list_item><paragraph><reference name="copyright" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#copyright">copyright</reference></paragraph></list_item></bullet_list></section><section id="elements-de-d-coration" name="elements de décoration"><title auto="1" refid="id52"><generated class="sectnum">5.1.4 </generated>Elements de décoration</title><bullet_list bullet="-"><list_item><paragraph><reference name="decoration" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#decoration">decoration</reference></paragraph></list_item><list_item><paragraph><reference name="footer" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footer">footer</reference></paragraph></list_item><list_item><paragraph><reference name="header" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#header">header</reference></paragraph></list_item></bullet_list></section><section id="elements-structurels" name="elements structurels"><title auto="1" refid="id53"><generated class="sectnum">5.1.5 </generated>Elements structurels</title><bullet_list bullet="-"><list_item><paragraph><reference name="section" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#section">section</reference></paragraph></list_item><list_item><paragraph><reference name="topic" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#topic">topic</reference></paragraph></list_item><list_item><paragraph><reference name="sidebar" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#sidebar">sidebar</reference></paragraph></list_item><list_item><paragraph><reference name="transition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#transition">transition</reference></paragraph></list_item></bullet_list></section><section id="elements-du-corps" name="elements du corps"><title auto="1" refid="id54"><generated class="sectnum">5.1.6 </generated>Elements du corps</title><bullet_list bullet="-"><list_item><paragraph><reference name="admonition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#admonition">admonition</reference></paragraph></list_item><list_item><paragraph><reference name="attention" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#attention">attention</reference></paragraph></list_item><list_item><paragraph><reference name="block_quote" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#block-quote">block_quote</reference></paragraph></list_item><list_item><paragraph><reference name="bullet_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#bullet-list">bullet_list</reference></paragraph></list_item><list_item><paragraph><reference name="caution" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#caution">caution</reference></paragraph></list_item><list_item><paragraph><reference name="classifier" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#classifier">classifier</reference></paragraph></list_item><list_item><paragraph><reference name="danger" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#danger">danger</reference></paragraph></list_item><list_item><paragraph><reference name="definition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition">definition</reference></paragraph></list_item><list_item><paragraph><reference name="definition_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list">definition_list</reference></paragraph></list_item><list_item><paragraph><reference name="definition_list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list-item">definition_list_item</reference></paragraph></list_item><list_item><paragraph><reference name="description" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#description">description</reference></paragraph></list_item><list_item><paragraph><reference name="doctest_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#doctest-block">doctest_block</reference></paragraph></list_item><list_item><paragraph><reference name="enumerated_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#enumerated-list">enumerated_list</reference></paragraph></list_item><list_item><paragraph><reference name="error" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#error">error</reference></paragraph></list_item><list_item><paragraph><reference name="field" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field">field</reference></paragraph></list_item><list_item><paragraph><reference name="field_body" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-body">field_body</reference></paragraph></list_item><list_item><paragraph><reference name="field_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-list">field_list</reference></paragraph></list_item><list_item><paragraph><reference name="field_name" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-name">field_name</reference></paragraph></list_item><list_item><paragraph><reference name="footnote" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footnote">footnote</reference></paragraph></list_item><list_item><paragraph><reference name="hint" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#hint">hint</reference></paragraph></list_item><list_item><paragraph><reference name="image" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#image">image</reference></paragraph></list_item><list_item><paragraph><reference name="important" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#important">important</reference></paragraph></list_item><list_item><paragraph><reference name="line" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#line">line</reference></paragraph></list_item><list_item><paragraph><reference name="line_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#line-block">line_block</reference></paragraph></list_item><list_item><paragraph><reference name="list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#list-item">list_item</reference></paragraph></list_item><list_item><paragraph><reference name="literal_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#literal-block">literal_block</reference></paragraph></list_item><list_item><paragraph><reference name="note" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#note">note</reference></paragraph></list_item><list_item><paragraph><reference name="option" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option">option</reference></paragraph></list_item><list_item><paragraph><reference name="option_argument" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-argument">option_argument</reference></paragraph></list_item><list_item><paragraph><reference name="option_group" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-group">option_group</reference></paragraph></list_item><list_item><paragraph><reference name="option_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-list">option_list</reference></paragraph></list_item><list_item><paragraph><reference name="option_list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-list-item">option_list_item</reference></paragraph></list_item><list_item><paragraph><reference name="option_string" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-string">option_string</reference></paragraph></list_item><list_item><paragraph><reference name="paragraph" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#paragraph">paragraph</reference></paragraph></list_item><list_item><paragraph><reference name="term" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#term">term</reference></paragraph></list_item><list_item><paragraph><reference name="tip" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tip">tip</reference></paragraph></list_item><list_item><paragraph><reference name="warning" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#warning">warning</reference></paragraph></list_item></bullet_list></section><section id="elements-des-tableaux" name="elements des tableaux"><title auto="1" refid="id55"><generated class="sectnum">5.1.7 </generated>Elements des tableaux</title><bullet_list bullet="-"><list_item><paragraph><reference name="table" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#table">table</reference></paragraph></list_item><list_item><paragraph><reference name="tbody" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tbody">tbody</reference></paragraph></list_item><list_item><paragraph><reference name="entry" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#entry">entry</reference></paragraph></list_item><list_item><paragraph><reference name="row" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#row">row</reference></paragraph></list_item><list_item><paragraph><reference name="colspec" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#colspec">colspec</reference></paragraph></list_item><list_item><paragraph><reference name="thead" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#thead">thead</reference></paragraph></list_item><list_item><paragraph><reference name="tgroup" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tgroup">tgroup</reference></paragraph></list_item></bullet_list></section><section id="elements-de-la-ligne" name="elements de la ligne"><title auto="1" refid="id56"><generated class="sectnum">5.1.8 </generated>Elements de la ligne</title><bullet_list bullet="-"><list_item><paragraph><reference name="emphasis" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#emphasis">emphasis</reference></paragraph></list_item><list_item><paragraph><reference name="strong" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#strong">strong</reference></paragraph></list_item><list_item><paragraph><reference name="literal" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#literal">literal</reference></paragraph></list_item><list_item><paragraph><reference name="reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#reference">reference</reference></paragraph></list_item><list_item><paragraph><reference name="footnote_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footnote-reference">footnote_reference</reference></paragraph></list_item></bullet_list></section></section><section id="fonctionnalit-s-non-implant-es" name="fonctionnalités non-implantées"><title auto="1" refid="id57"><generated class="sectnum">5.2 </generated>Fonctionnalités non-implantées</title><bullet_list bullet="-"><list_item><paragraph><reference name="abbreviation" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#abbreviation">abbreviation</reference></paragraph></list_item><list_item><paragraph><reference name="acronym" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#acronym">acronym</reference></paragraph></list_item><list_item><paragraph><reference name="attribution" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#attribution">attribution</reference></paragraph></list_item><list_item><paragraph><reference name="caption" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#caption">caption</reference></paragraph></list_item><list_item><paragraph><reference name="citation" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#citation">citation</reference></paragraph></list_item><list_item><paragraph><reference name="citation_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#citation-reference">citation_reference</reference></paragraph></list_item><list_item><paragraph><reference name="comment" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#comment">comment</reference></paragraph></list_item><list_item><paragraph><reference name="compound" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#compound">compound</reference></paragraph></list_item><list_item><paragraph><reference name="container" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#container">container</reference></paragraph></list_item><list_item><paragraph><reference name="figure" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#figure">figure</reference></paragraph></list_item><list_item><paragraph><reference name="generated" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#generated">generated</reference></paragraph></list_item><list_item><paragraph><reference name="inline" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#inline">inline</reference></paragraph></list_item><list_item><paragraph><reference name="label" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#label">label</reference></paragraph></list_item><list_item><paragraph><reference name="legend" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#legend">legend</reference></paragraph></list_item><list_item><paragraph><reference name="pending" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#pending">pending</reference></paragraph></list_item><list_item><paragraph><reference name="problematic" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#problematic">problematic</reference></paragraph></list_item><list_item><paragraph><reference name="raw" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#raw">raw</reference></paragraph></list_item><list_item><paragraph><reference name="rubric" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#rubric">rubric</reference></paragraph></list_item><list_item><paragraph><reference name="subscript" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#subscript">subscript</reference></paragraph></list_item><list_item><paragraph><reference name="substitution_definition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-definition">substitution_definition</reference></paragraph></list_item><list_item><paragraph><reference name="substitution_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-reference">substitution_reference</reference></paragraph></list_item><list_item><paragraph><reference name="superscript" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#superscript">superscript</reference></paragraph></list_item><list_item><paragraph><reference name="system_message" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#system-message">system_message</reference></paragraph></list_item><list_item><paragraph><reference name="target" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#target">target</reference></paragraph></list_item><list_item><paragraph><reference name="title_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#title-reference">title_reference</reference></paragraph></list_item></bullet_list><target id="abbreviation" name="abbreviation" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#abbreviation"/><target id="acronym" name="acronym" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#acronym"/><target id="address" name="address" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#address"/><target id="admonition" name="admonition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#admonition"/><target id="attention" name="attention" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#attention"/><target id="attribution" name="attribution" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#attribution"/><target id="author" name="author" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#author"/><target id="authors" name="authors" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#authors"/><target id="block-quote" name="block_quote" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#block-quote"/><target id="bullet-list" name="bullet_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#bullet-list"/><target id="caption" name="caption" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#caption"/><target id="caution" name="caution" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#caution"/><target id="citation" name="citation" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#citation"/><target id="citation-reference" name="citation_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#citation-reference"/><target id="classifier" name="classifier" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#classifier"/><target id="colspec" name="colspec" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#colspec"/><target id="comment" name="comment" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#comment"/><target id="compound" name="compound" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#compound"/><target id="contact" name="contact" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#contact"/><target id="container" name="container" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#container"/><target id="copyright" name="copyright" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#copyright"/><target id="danger" name="danger" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#danger"/><target id="date" name="date" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#date"/><target id="decoration" name="decoration" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#decoration"/><target id="definition" name="definition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition"/><target id="definition-list" name="definition_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list"/><target id="definition-list-item" name="definition_list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#definition-list-item"/><target id="description" name="description" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#description"/><target id="docinfo" name="docinfo" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#docinfo"/><target id="doctest-block" name="doctest_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#doctest-block"/><target id="document" name="document" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#document"/><target id="emphasis" name="emphasis" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#emphasis"/><target id="entry" name="entry" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#entry"/><target id="enumerated-list" name="enumerated_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#enumerated-list"/><target id="error" name="error" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#error"/><target id="field" name="field" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field"/><target id="field-body" name="field_body" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-body"/><target id="field-list" name="field_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-list"/><target id="field-name" name="field_name" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#field-name"/><target id="figure" name="figure" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#figure"/><target id="footer" name="footer" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footer"/><target id="footnote" name="footnote" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footnote"/><target id="footnote-reference" name="footnote_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#footnote-reference"/><target id="generated" name="generated" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#generated"/><target id="header" name="header" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#header"/><target id="hint" name="hint" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#hint"/><target id="image" name="image" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#image"/><target id="important" name="important" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#important"/><target id="inline" name="inline" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#inline"/><target id="label" name="label" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#label"/><target id="legend" name="legend" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#legend"/><target id="line" name="line" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#line"/><target id="line-block" name="line_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#line-block"/><target id="list-item" name="list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#list-item"/><target id="literal" name="literal" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#literal"/><target id="literal-block" name="literal_block" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#literal-block"/><target id="note" name="note" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#note"/><target id="option" name="option" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option"/><target id="option-argument" name="option_argument" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-argument"/><target id="option-group" name="option_group" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-group"/><target id="option-list" name="option_list" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-list"/><target id="option-list-item" name="option_list_item" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-list-item"/><target id="option-string" name="option_string" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#option-string"/><target id="organization" name="organization" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#organization"/><target id="paragraph" name="paragraph" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#paragraph"/><target id="pending" name="pending" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#pending"/><target id="problematic" name="problematic" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#problematic"/><target id="raw" name="raw" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#raw"/><target id="reference" name="reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#reference"/><target id="revision" name="revision" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#revision"/><target id="row" name="row" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#row"/><target id="rubric" name="rubric" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#rubric"/><target id="section" name="section" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#section"/><target id="sidebar" name="sidebar" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#sidebar"/><target id="status" name="status" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#status"/><target id="strong" name="strong" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#strong"/><target id="subscript" name="subscript" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#subscript"/><target id="substitution-definition" name="substitution_definition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-definition"/><target id="substitution-reference" name="substitution_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#substitution-reference"/><target id="subtitle" name="subtitle" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#subtitle"/><target id="superscript" name="superscript" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#superscript"/><target id="system-message" name="system_message" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#system-message"/><target id="table" name="table" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#table"/><target id="target" name="target" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#target"/><target id="tbody" name="tbody" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tbody"/><target id="term" name="term" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#term"/><target id="tgroup" name="tgroup" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tgroup"/><target id="thead" name="thead" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#thead"/><target id="tip" name="tip" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#tip"/><target id="title" name="title" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#title"/><target id="title-reference" name="title_reference" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#title-reference"/><target id="topic" name="topic" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#topic"/><target id="transition" name="transition" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#transition"/><target id="version" name="version" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#version"/><target id="warning" name="warning" refuri="http://docutils.sourceforge.net/docs/ref/doctree.html#warning"/></section></section><section id="les-diff-rentes-librairies-utilis-es" name="les différentes librairies utilisées"><title auto="1" refid="id58"><generated class="sectnum">6 </generated>Les différentes librairies utilisées</title><section dupname="dom4j" id="dom4j"><title auto="1" refid="id59"><generated class="sectnum">6.1 </generated><reference name="dom4j" refuri="http://www.dom4j.org">dom4j</reference></title><paragraph><reference name="Dom4j" refuri="http://www.dom4j.org">Dom4j</reference> est une API Open Source Java permettant de travailler avec XML, XPath et XSLT. Cette bibliothèque est compatible avec les standards DOM, SAX et JAXP.</paragraph></section><section dupname="javax.xml.transform" id="javax-xml-transform"><title auto="1" refid="id60"><generated class="sectnum">6.2 </generated><reference name="javax.xml.transform" refuri="http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/package-summary.html">javax.xml.transform</reference></title><paragraph>Librairie permettant la transformation XSL.</paragraph></section><section dupname="sdoc" id="sdoc"><title auto="1" refid="id61"><generated class="sectnum">6.3 </generated><reference name="SDoc" refuri="http://sdoc.sourceforge.net/wiki/pmwiki.php">SDoc</reference></title><paragraph><reference name="SDoc" refuri="http://sdoc.sourceforge.net/wiki/pmwiki.php">SDoc</reference> fournit des composants Swing qui inclut la coloration syntaxique pour de nombreux langages.</paragraph></section><section dupname="xmlunit" id="xmlunit"><title auto="1" refid="id62"><generated class="sectnum">6.4 </generated><reference name="Xmlunit" refuri="http://xmlunit.sourceforge.net/">Xmlunit</reference></title><paragraph><reference name="Xmlunit" refuri="http://xmlunit.sourceforge.net/">Xmlunit</reference> permet de comparer deux fichiers XML pour mettre en évidences les différences.</paragraph><target id="id20" name="dom4j" refuri="http://www.dom4j.org"/><target id="id21" name="javax.xml.transform" refuri="http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/package-summary.html"/><target id="id22" name="sdoc" refuri="http://sdoc.sourceforge.net/wiki/pmwiki.php"/><target id="id23" name="xmlunit" refuri="http://xmlunit.sourceforge.net/"/></section></section><section id="documentation-externe" name="documentation externe"><title auto="1" refid="id63"><generated class="sectnum">7 </generated>Documentation externe</title><paragraph>Le site de docUtils : <reference refuri="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</reference></paragraph><paragraph>La DTD reStructuredText : <reference refuri="http://docutils.sourceforge.net/docs/ref/doctree.html">http://docutils.sourceforge.net/docs/ref/doctree.html</reference></paragraph><paragraph>Un XSL permettant de convertir le XML en RST : <reference refuri="http://www.merten-home.de/FreeSoftware/xml2rst/">http://www.merten-home.de/FreeSoftware/xml2rst/</reference></paragraph><paragraph>Pour la génération de la javaDoc en RST : <reference refuri="http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/overview.html">http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/overview.html</reference></paragraph><paragraph>... footer:: view <reference anonymous="1" name="code source" refuri="frEntier.rst">code source</reference></paragraph><target anonymous="1" id="id24" refuri="frEntier.rst"/></section></document> \ No newline at end of file Property changes on: trunk/jrst2/src/test/resources/comparePython.xml ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/definition.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/definition.rst) =================================================================== --- trunk/jrst2/src/test/resources/definition.rst (rev 0) +++ trunk/jrst2/src/test/resources/definition.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,14 @@ +term 1 + Definition 1. + +term 2 + Definition 2, paragraph 1. + + Definition 2, paragraph 2. + +term 3 : classifier + Definition 3. + +term 4 : classifier one : classifier two + Definition 4. + Property changes on: trunk/jrst2/src/test/resources/definition.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/footnoteTest.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/footnoteTest.rst) =================================================================== --- trunk/jrst2/src/test/resources/footnoteTest.rst (rev 0) +++ trunk/jrst2/src/test/resources/footnoteTest.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,13 @@ +Autonumbered footnotes are +possible, like using [#]_ and [#]_. + +.. [#] This is the first one. +.. [#] This is the second one. + +They may be assigned 'autonumber +labels' - for instance, +[#fourth]_ and [#third]_. + +.. [#third] a.k.a. third_ + +.. [#fourth] a.k.a. fourth_ Property changes on: trunk/jrst2/src/test/resources/footnoteTest.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/footnoteTest2.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/footnoteTest2.rst) =================================================================== --- trunk/jrst2/src/test/resources/footnoteTest2.rst (rev 0) +++ trunk/jrst2/src/test/resources/footnoteTest2.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,17 @@ +Auto-symbol footnotes are also +possible, like this: [*]_ and [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [*]_ [1]_ aaaa_. + +.. _aaaa: index.html +.. [1] 1 +.. [*] 1 +.. [*] 2 +.. [*] 3 +.. [*] 4 +.. [*] 5 +.. [*] 6 +.. [*] 7 +.. [*] 8 +.. [*] 9 +.. [*] 10 +.. [*] 11 +.. [*] 12 Property changes on: trunk/jrst2/src/test/resources/footnoteTest2.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/frEntier.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/frEntier.rst) =================================================================== --- trunk/jrst2/src/test/resources/frEntier.rst (rev 0) +++ trunk/jrst2/src/test/resources/frEntier.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,915 @@ +================================== +Parseur reStructuredText : le JRst +================================== + +:author: Sylvain LETELLIER <letellier@codelutin> +:organization: Code Lutin +:date: $date: 01/06/2007$ +:copyright: © 2007. JRST - Code Lutin - GPL + +---------------------- + +.. sectnum:: + +.. contents:: Sommaire + +Documentation utilisateur +========================= + + +Présentation +------------ + +Le format reStructuredText est un format de description de documents. A l'image +d'autres LaTeX ou DocBook, il peut être décliné en une multitude de formats. Ces +formats souffrent habituellement d'une syntaxe envahissante qui, si elle est +nécessaire pour des documents très spécifiques, devient gênante quand il s'agit +de créer rapidement un document pas trop complexe. RST dispose quant à lui d'une +syntaxe tellement simple qu'elle en devient presque invisible. + +JRST est un parseur RST en Java permettant de créer une représentation en arbre +d'un document. Il devient alors facile de générer une représentation du document +vers différents formats. + + +Usage +----- + +Le parser JRST prend un fichier reStructuredText en entré et génère un fichier XML +qui pourra ensuite servir à produire divers formats de fichiers grâce à des fichiers +XSL de générations. Les formats de sortie disponibles sont le html, le xhtml, le rst, +le pdf, le docbook, le odt (Open-Office), le rtf, ou encore le XML [1]_. + +:: + + JRST myfile.rst + +Cette commande aura pour effet de convertir le fichier myfile.rst en XML qui sera affiché sur la sortie standard (console). +Plusieurs options sont disponibles : + +-o file,--outFile=file pour rediriger la sortie vers un fichier. +-t format,--outType format pour préciser un format de sortie, donc utiliser un ou des fichiers XSL de génération. Plusieurs formats sont disponibles xhtml, docbook, xml, html, xdoc, rst, pdf, odt, rtf. +-x xslFile,--xslFile xslFile sert à préciser le fichier xsl de génération à utiliser. +--force forcer l'écriture d'un fichier, si le fichier de sortie existe, il sera remplacé. +--help pour afficher les options disponibles : + + +:: + + Usage: [options] FILE + [--force] : overwrite existing out file + [--help] : display this help and exit + [--outFile -o value] : Output file + [--outType -t /xhtml|docbook|xml|html|xdoc|rst/] : Output type + [--xslFile -x value] : XSL file list to apply, comma separated + + +ex : + +:: + + JRST --force -t html -o myfile.html myfile.rst + +Cette commande produira un fichier html (myfile.html) à partir du fichier reStructuredText (myfile.rst) +même si myfile.html existe déjà. + + +Plugin Maven +------------ + +Un plugin Maven est disponible à l'adresse suivante +http://jrst.labs.libre-entreprise.org/maven-jrst-plugin. Il permet l'utilisation +depuis Maven de JRst. + +.. [1] Seul les formats html, xhtml, DocBook, xdoc et pdf sont disponible pour le moment. + +Maven : http://maven.apache.org/ +XSL : http://jrst.labs.libre-entreprise.org/fr/devel/presentationXSL.rst +DocBook : http://www.docbook.org/ +LaTex : http://www.latex-project.org/ + +Introduction à ReStructuredText +=============================== + +Document adaptée du document de Richard Jones : http://docutils.sourceforge.net/sandbox/wilk/french/quickstart-fr.html + + +Ce texte contient des liens de la forme. Ils sont +relatifs au manuel de référence utilisateur Quick reStructuredText. +S'ils ne fonctionnent pas, référez vous au document master quick +reference. + +Quick reStructuredText : http://docutils.sourceforge.net/docs/rst/quickref.html +master quick reference : http://docutils.sourceforge.net/docs/rst/quickref.html + + +Structure +--------- + +Pour commencer, il me semble que "Structured Text" n'est pas tout à fait la +bonne appellation. Nous devrions plutôt le nommer "Relaxed Text" qui contient +quelques schémas logiques. Ces schémas sont interprétés par un convertisseur +HTML pour produire "Very Structured Text" (un texte très structuré) qui pourra +être utilisé par un navigateur web. + +Le schéma le plus simple est le **paragraphe**. +C'est un bloc de texte séparé par des lignes vides (une seule suffit). +Les paragraphes doivent avoir le même décalage -- c'est à dire des espaces +à gauche. Ces paragraphes produiront un texte décalé. Par exemple:: + + Ceci est un paragraphe. + Très court. + + Le texte de ce paragraphe sera décalé, + généralement utilisé pour des citations. + + En voilà un autre + +Le résultat donne : + + Ceci est un paragraphe. + Très court. + + Le texte de ce paragraphe sera décalé, + généralement utilisé pour des citations. + + En voilà un autre + + +Styles de texte +--------------- + + +Dans les paragraphes et le corps du texte, nous pouvons utiliser +des marqueurs pour *italique* avec "`` *italique* ``" ou **gras** +avec "`` **gras** ``". + +Notez qu'aucun traitement supplémentaire n'est apporté entre deux +doubles apostrophes inversées -- les astérisques, comme dans "`` * ``", +sont donc conservées en l'état. + +Si vous souhaitez utiliser un de ces caractères "spéciaux" dans +le texte, il n'y a généralement pas de problème -- reStructuredText +est assez malin. +Par exemple, cet astérisque ``*`` est traité correctement. Si vous +souhaitez par contre ``*``entourer un texte par des astérisques``*`` +**sans** qu'il soit en italique, il est nécessaire d'indiquer que +l'astérisque ne doit pas être interprété. Pour cela il suffit de placer +une barre oblique inversée juste avant lui, comme ça "``\*``", ou +en l'entourant de doubles apostrophes inversées (litteral), comme cela :: + + ``\*`` + +(``\*`` n'est pas implanté dans le JRST seul les `` fonctionnent) + + + +Listes +------ + +Il y a trois types de listes: **numérotées**, **avec puces** et +de **définitions**. Dans chaque cas, nous pouvons avoir autant +de paragraphes, sous-listes, etc. que l'on souhaite, tant que +le décalage à gauche est aligné sur la première ligne. + +Les listes doivent toujours démarrer un nouveau paragraphe +-- c'est à dire qu'il doit y avoir un saut de ligne juste avant. + +Listes **numérotées** (par des nombres, lettres, chiffres romains;) + + +En démarrant une ligne avec un numéro ou une lettre suivie d'un +point ".", une parenthèse droite ")" ou entouré par des parenthèses +-- comme vous préférez. Toutes ces formes sont reconnues:: + + 1. nombres + + A. Lettres en majuscule + qui continue sur plusieurs ligne + + avec deux paragraphes et tout ! + + a. lettres minuscules + + 3. avec une sous-liste qui démarre à un nombre différent + 4. faites attention à garder une séquence de nombre correcte ! + + I. majuscules en chiffres romains + + i. minuscules en chiffres romains + + (1) des nombres à nouveau + + 1) et encore + +Le résultat (note : Tous les styles de listes ne sont pas toujours +supportés par tous les navigateurs, vous ne verrez donc pas forcément +les effets complets) : + +1. nombres + +A. Lettres en majuscule + qui continue sur plusieurs ligne + + avec deux paragraphes et tout ! + +a. lettres minuscules + + 3. avec une sous-liste qui démarre à un nombre différent + 4. faites attention à garder une séquence de nombre correcte ! + +I. majuscules en chiffres romains + +i. minuscules en chiffres romains + +(1) des nombres à nouveau + +1) et encore + +Listes **à puces** + + +De la même manière que pour les listes numérotées, il faut démarrer +la première ligne avec une puce -- soit "-", "+" ou "*":: + + * une puce "*" + + - une sous-liste avec "-" + + + à nouveau une sous-liste + + - une autre option + +Le résultat: + + * une puce "*" + + - une sous-liste avec "-" + + + à nouveau une sous-liste + + - une autre option + +Les listes de **définitions** + + +Comme les deux autres, les listes de définitions consistent en un +terme et la définition de ce terme. Le format est le suivant:: + + Quoi + Les listes de définitions associent un terme avec une définition. + + *Comment* + Le terme est une phrase d'une ligne, et la définition est d'un + ou plusieurs paragraphes ou éléments, décalés par rapport au terme. + Les lignes vides ne sont pas autorisées entre le terme et la définition. + +Le résultat: + +Quoi + Les listes de définitions associent un terme avec une définition. + +*Comment* + Le terme est une phrase d'une ligne, et la définition est d'un + ou plusieurs paragraphes ou éléments, décalés par rapport au terme. + Les lignes vides ne sont pas autorisées entre le terme et la définition. + +Préformatage +------------ + +Pour inclure un texte préformaté sans traitement +il suffit de terminer le paragraphe par "``::``". Le texte préformaté est +terminé lorsqu'une ligne retombe au niveau du décalage précédent. Par exemple:: + + Un exemple:: + + Espaces, nouvelles lignes, lignes vides, et toutes sortes de marqueurs + (comme *ceci* ou \cela) sont préservés dans les bloc préformatés. + + Fin de l'exemple + +Le résultat: + + Un exemple:: + + Espaces, nouvelles lignes, lignes vides, et toutes sortes de marqueurs + (comme *ceci* ou \cela) sont préservés dans les bloc préformatés. + + Fin de l'exemple + +Notez que si le paragraphe contient seulement "``::``", il est ignoré. + + :: + + Ceci est un texte préformaté, + le paragraphe "::" est ignoré. + +Sections +-------- + +Pour diviser un texte en plusieurs sections, nous utilisons des +**en-têtes de section**. C'est à dire une seule ligne de texte (d'un +ou plusieurs mots) avec un ornement : juste en dessous et éventuellement +dessus aussi, avec des tirets "``-----``", égal "``=====``", tildes +"``~~~~~``" ou n'importe quel de ces caractères ``= - ` : ' " ~ ^ _ * + # < >`` +qui vous semble convenir. Un ornement simplement en dessous n'a pas la +même signification qu'un ornement dessus-dessous avec le même caractère. +Les ornements doivent avoir au moins la taille du texte. Soyez cohérent, +les ornements identiques sont censés être du même niveau:: + + Chapitre 1 + ========== + + Section 1.1 + ----------- + + Sous-section 1.1.1 + ~~~~~~~~~~~~~~~~~~ + + Section 1.2 + ----------- + + Chapitre 2 + ========== + +Le résultat de cette structure, sous la forme pseudo-XML:: + + <section> + <title> + Chapitre 1 + <section> + <title> + Section 1.1 + <section> + <title> + Sous-section 1.1.1 + <section> + <title> + Section 1.2 + <section> + <title> + Chapitre 2 + +(Pseudo-XML utilise une indentation et n'as pas de balises finale. Il +n'est pas possible de montrer le résultat, comme dans les autres exemples, +du fait que les sections ne peuvent être utilisées à l'intérieur d'un +paragraphe décalé. Pour un exemple concret, comparez la structure de +ce document avec le résultat.) + +Notez que les en-têtes de section sont utilisable comme cible de liens, +simplement en utilisant leur nom. Pour créer un lien sur la section Listes, +j'écris "``Listes_``". Si le titre comporte des espaces, il est nécessaire +d'utiliser les doubles apostrophes inversées "```Styles de texte```". + +Pour indiquer le titre du document, utilisez un style d'ornement unique +en début de document. Pour indiquer un sous-titre de document, utilisez +un autre ornement unique juste après le titre. +Par exemple:: + + ================= + Titre du document + ================= + ---------- + Sous-titre + ---------- + + Titre de la section + =================== + + ... + +Notez que "Titre du document" et "Titre de la section" utilisent le signe +égal, mais sont différents et sans relation. Le texte et l'ornement peuvent +être de la même taille pour des questions d'esthétisme. + + +Images +------ + +Pour inclure une image dans votre document, vous devez utiliser la directive +``image``. +Par exemple:: + + .. image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/user/images/biohazard.png + +Le résultat: + +.. image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/user/images/biohazard.png + +La partie ``images/biohazard.png`` indique le chemin d'accès au fichier +de l'image qui doit apparaître. Il n'y a pas de restriction sur l'image +(format, taille etc). Si l'image doit apparaître en HTML et que vous +souhaitez lui ajouter des informations:: + + .. image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/user/image/biohazard.png + :height: 100 + :width: 200 + :scale: 50 + :alt: texte alternatif + +Consultez la documentation complète de la directive image pour plus d'informations. + +Documentation images : http://docutils.sourceforge.net/spec/rst/directives.html#images + + +Et ensuite ? +------------ + +Cette introduction montre les possibilités les plus courantes de reStructuredText, +mais il y en a bien d'autres à explorer. Le manuel de référence utilisateur +Quick reStructuredText est recommandé pour aller plus loin. Pour les détails complets +consultez reStructuredText Markup Specification [#]_. + + +.. [#] Si ce lien relatif ne fonctionne pas, consultez le document principal: + http://docutils.sourceforge.net/spec/rst/reStructuredText.html. + +reStructuredText Markup Specification : http://docutils.sourceforge.net/spec/rst/reStructuredText.html +Docutils-Users mailing list : http://lists.sourceforge.net/lists/listinfo/docutils-users +Docutils project web site : http://docutils.sourceforge.net/ + +Fonctionnalités proposées +========================= + +La DTD de Docutils : http://docutils.sourceforge.net/docs/ref/doctree.html + + +Fonctionnalités implantées +-------------------------- + +Element racine +~~~~~~~~~~~~~~ + +- document + +Elements titre +~~~~~~~~~~~~~~ + +- subtitle +- title + +Elements bibliographiques +~~~~~~~~~~~~~~~~~~~~~~~~~ + +- docinfo +- author +- authors +- organization +- address +- contact +- version +- revision +- status +- date +- copyright + +Elements de décoration +~~~~~~~~~~~~~~~~~~~~~~ + +- decoration +- footer +- header + +Elements structurels +~~~~~~~~~~~~~~~~~~~~ + +- section +- topic +- sidebar +- transition + +Elements du corps +~~~~~~~~~~~~~~~~~ + +- admonition +- attention +- block_quote +- bullet_list +- caution +- classifier +- danger +- definition +- definition_list +- definition_list_item +- description +- doctest_block +- enumerated_list +- error +- field +- field_body +- field_list +- field_name +- footnote +- hint +- image +- important +- line +- line_block +- list_item +- literal_block +- note +- option +- option_argument +- option_group +- option_list +- option_list_item +- option_string +- paragraph +- term +- tip +- warning + +Elements des tableaux +~~~~~~~~~~~~~~~~~~~~~ + +- table +- tbody +- entry +- row +- colspec +- thead +- tgroup + +Elements de la ligne +~~~~~~~~~~~~~~~~~~~~ + +- emphasis +- strong +- literal +- reference +- footnote_reference + +Fonctionnalités non-implantées +------------------------------ + +- abbreviation +- acronym +- attribution +- caption +- citation +- citation_reference +- comment +- compound +- container +- figure +- generated +- inline +- label +- legend +- pending +- problematic +- raw +- rubric +- subscript +- substitution_definition +- substitution_reference +- superscript +- system_message +- target +- title_reference + + +Documentation développeur +========================= + +Le diagramme de Class +--------------------- + +|classDiagramme| + +La Class **AdvancedReader** à pour fonction de faciliter la lecture du fichier RST grâce à différentes méthodes : + - String readLine() : renvoie une ligne + - String[] readLines(int nombresLigne) : renvoie un certain nombre de lignes + - Stringn[] readWhile(Pattern p) : renvoie les lignes tant qu'elles correspondent au pattern + +... + +La Class **JRSTLexer** utilise **AdvancedReader** pour construire un fichier XML, il parcours +l'ensemble du document pour isoler les types de données, leurs paramètres et leurs contenus, +donc rassembler toutes les informations utiles à la mise en forme du XML final. Il va commencer par +l'entête du document (peekHeader(), peekDocInfo()) pour ensuite s'intéresser au corps (peekBody()). + +La Class **JRSTReader** utilise **JRSTLexer**, il interprète le XML qui lui est renvoyé pour construire +le XML final. Celui-ci est conforme à la DTD définie par DocUtils. Cette Class à parfois besoin de +s'appeler elle même lorsque une partie du document doit être interprétée indépendamment du reste. +Par exemple, s'il y a une liste dans une case d'un tableau, l'on extrait les informations de la case +et on les interprètes, le contenu d'une admoniton (une note) doit lui aussi être considéré comme un +document indépendant. Lorsque la génération est terminée, la Class compose le sommaire (composeContent()) +puis s'occupe de toutes les spécificités « inline » (inline()), comme par exemple les mots en italique ou +gras, les références, les footnotes... Tout ce qui peut apparaître à l'intérieur d'une ligne. + +La Class **reStructuredText** référence toutes les variables nécessaires à la génération du XML final. + +La Class **JRST** contient la méthode main(), elle gère les options, la lecture et l'écriture des fichiers. +Elle lit le document, le parse grâce à la class **JRSTReader** puis applique le XSL désiré (si besoin) +grâce à la class **JRSTGenerator**. + +La génération +------------- + +|diagrammegeneration| + +Référence : + +- xml2rst.xsl (convertion de xml de docutils vers rst) : http://www.merten-home.de/FreeSoftware/xml2rst +- dn2dbk.xsl (convertion de xml de docutils vers docbook) : http://membres.lycos.fr/ebellot/dn2dbk +- les xsl de nwalsh (convertion de docbook vers FO et xhtml) : http://nwalsh.com + +- XMLmind (convertion de FO vers ODT et RTF) : http://www.xmlmind.com/foconverter/what_is_xfc.html +- FOP (convertion de FO vers PDF) : http://xmlgraphics.apache.org/fop + +Exemple d'utilisation +--------------------- + +L'on souhaite convertir le document rst (text.rst) suivant en html (text.html) : + +:: + + ===== + Titre + ===== + + :Author: Letellier Sylvain + + .. Attention:: texte à être réinterprété comme un fichier rst indépendant + ceci est considéré comme un **paragraphe** + +On utilise donc la commande suivante:: + + JRST -t html -o text.html text.rst + +Ce diagramme de séquence décrit le fonctionnement du parseur tout au long de la génération : + +|sequanceDiagramme| + +La Classe **JRSTGenerator**, grâce au fichier XSL rst2xhtml.xsl, renvoie le fichier html suivant:: + + <?xml version="1.0" encoding="UTF-8"?> + <html xmlns="http://www.w3.org/TR/xhtml1/strict"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="generator" content="JRST http://jrst.labs.libre-entreprise.org/"/> + <title>Titre</title> + </head> + <body> + <h1>Titre</h1> + <table class="docinfo" frame="void" rules="none"> + <col class="docinfo-name"/> + <col class="docinfo-content"/> + <tbody valign="top"> + <tr> + <th class="docpatterninfo-name">author :</th> + <td class="docinfo-content">Letellier Sylvain</td> + </tr> + </tbody> + </table> + <div class="attention"> + <p class="title">attention :</p> + <p class="body"> + <p>texte à être réinterprété comme un fichier rst indépendant + ceci est considéré comme un <strong>paragraphe</strong></p> + </p> + </div> + </body> + </html> + +Qui affiche la page (un CSS [2]_ à été ajouté pour la mise en forme) : + +.. topic:: Titre + + :Author: Letellier Sylvain + + .. Attention:: texte à être réinterprété comme un fichier rst indépendant + ceci est considéré comme un **paragraphe** + +Utilisation de XSL externe +-------------------------- + +JRST propose de transformer le XML de docutils avec des fichiers XSL externe. +Pour cela, il faut utiliser la commande:: + + JRST -x fichierXSL, fichierXSL2 fichierRST +ou:: + + JRST --xslFile fichierXSL, fichierXSL2 fichierRST + +JRST traitera le fichierRST, le XML de DocUtils qui est retourné sera transformé par la Class JRSTgenerator +en commençant par le fichierXSL puis par le fichierXSL2... + +.. [2] Cascading Style Sheets : http://fr.wikipedia.org/wiki/Feuilles_de_style_en_cascade +.. |diagrammegeneration| image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/devel/images/diagrammeGeneration.png +.. |classDiagramme| image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/devel/images/diagrammeClass.png +.. |sequanceDiagramme| image:: /home/letellier/PROJET/jrst2/src/site/fr/rst/devel/images/diagrammeSequance.png + +Le XSL (Extensible Stylesheets Language) +======================================== + +Introduction +------------ + +XML est un langage de structuration des données, et non de représentation des données. Ainsi XSL +(eXtensible StyleSheet Language) est un langage recommandé par le W3C pour effectuer la représentation +des données de documents XML. XSL est lui-même défini avec le formalisme XML, cela signifie qu'une +feuille de style XSL est un document XML bien formé. + +XSL est un langage permettant de définir des feuilles de style pour les documents XML au même titre que +les CSS (Cascading StyleSheets) pour le langage HTML ou bien DSSSL (Document Style Semantics and +Specification Language) pour le SGML. XSL est d'ailleurs inspiré de DSSSL dont il reprend beaucoup +de fonctionnalités et est compatible avec les CSS (il s'agit d'un sur-ensemble des CSS). + +Toutefois, contrairement aux CSS, XSL permet aussi de retraiter un document XML afin d'en modifier totalement +sa structure, ce qui permet à partir d'un document XML d'être capable de générer d'autres types de documents +(PostScript, HTML, Tex, RTF, ...) ou bien un fichier XML de structure différente. + +Ainsi la structuration des données (définie par XML) et leur représentation (définie par un langage tel que +XSL) sont séparées. Cela signifie qu'il est possible à partir d'un document XML de créer des documents +utilisant différentes représentations (HTML pour créer des pages web, WML pour les mobiles WAP, ...). + +|presentationxsl| + + +Structure d'un document XSL +--------------------------- + +Un document XSL étant un document XML, il commence obligatoirement par la balise suivante:: + + <?xml version="1.0" encoding="UTF-8"?> + + +D'autre part, toute feuille de style XSL est comprise entre les balises <xsl:stylesheet ...> et </xsl:stylesheet>. + +La balise xsl:stylesheet encapsule des balises xsl:template définissant les transformations à faire subir à certains +éléments du document XML. + +:: + + <?xml version="1.0" encoding="UTF-8"?> + <xsl:stylesheet + xmlns:xsl="http://www.w3.org/TR/WD-xsl" + xmlns="http://www.w3.org/TR/REC-html40" + result-ns=""> + <xsl:template ... > + <!-- traitements à effectuer --> + </xsl:template > + </xsl:stylesheet> + + +Association d'une feuille XSL à un document XML +----------------------------------------------- + +Une feuille de style XSL (enregistré dans un fichier dont l'extension est .xsl) peut être liée à un document +XML (de telle manière à ce que le document XML utilise la feuille XSL) en insérant la balise suivante au début +du document XML:: + + <?xml version="1.0" encoding="UTF-8"?> + <?xml-stylesheet href="fichier.xsl" type="text/xsl"?> + + +Les template rules (règles de gabarit) +-------------------------------------- + +Les template rules sont des balises XSL permettant de définir des opérations à réaliser sur certains éléments +du document XML utilisant la page XSL, c'est-à-dire généralement de transformer un tag XML en au moins un tag +HTML (généralement plusieurs). + +Ainsi le tag XML suivant:: + + <personne> + <nom>Pillou</nom> + <prenom>Jean-François</prenom> + </personne> + <personne> + <nom>VanHaute</nom> + <prenom>Nico</prenom> + </personne> + <personne> + <nom>Andrieu</nom> + <prenom>Seb</prenom> + </personne> + +pourra être transformé en les tags HTML suivants:: + + <ul> + <li>Pillou - Jean-François</li> + <li>VanHaute - Nico</li> + <li>Andrieu - Seb</li> + </ul> + +L'attribut "match" de la balise <xsl:template> permet de définir (grâce à la notation XPath) le ou les éléments +du document XML sur lesquels s'applique la transformation. + +La notation Xpath permet de définir des patterns, c'est-à-dire des chaînes de caractères permettant de repérer +un noeud dans le document XML. Les principaux patterns sont : + +======= ============= ================================================================= +Pattern Exemple Signification +======= ============= ================================================================= +``|`` Gauche|Milieu Indique une alternative (un noeud ou bien l'autre (ou les deux)) +/ personne/nom Chemin d'accès aux éléments (personne/bras/gauche) +* * Motif "joker" désignant n'importe quel élément +// //personne Indique tous les descendants d'un noeud +. . Caractérise le noeud courant +``..`` ``..`` Désigne le noeud parent +@ @valeur Indique un attribut caractéristique +======= ============= ================================================================= + +La transformation peut être réalisée : + +- soit par ajout de texte, +- soit en définissant des éléments de transformation, c'est-à-dire des éléments permettant de définir + des règles de transformation à appliquer aux éléments sélectionnés par l'attribut match + +Voici un exemple de feuille XSL permettant d'effectuer la transformation XML vers HTML décrite ci-dessus:: + + <?xml version="1.0" encoding="UTF-8"?> + <xsl:stylesheet + xmlns:xsl="http://www.w3.org/TR/WD-xsl" + xmlns="http://www.w3.org/TR/REC-html40" + result-ns=""> + <xsl:template match="/"> + <HTML> + <HEAD> + <TITLE>Titre de la page</TITLE> + </HEAD> + <BODY BGCOLOR="#FFFFFF"> + <xsl:apply-templates/> + </BODY> + </HTML> + </xsl:template > + <xsl:template match="personne" > + <ul> + <li> + <xsl:value-of select="nom"/> + - + <xsl:value-of select="prenom"/> + </li> + </ul> + </xsl:template > + </xsl:stylesheet> + + +Voici la signification de cette feuille XSL : + +* Le premier tag <xsl:template> permet d'appliquer une transformation à l'ensemble du document (la valeur + "/" de l'attribut match indique l'élément racine du document XML). Ce tag contient des balises HTML qui + seront transmises dans l'arbre résultat. +* L'élément <xsl:apply-templates/> indique le traitement de tous les enfants directs de la racine. +* La balise <xsl:template match="personne"> permet d'aller traiter les éléments de type personne. +* Enfin les deux éléments <xsl:value-of select="nom"/> et <xsl:value-of select="prenom"/> permettent de + recuperer les valeurs des balises nom et prenom. + +Références +---------- + +- Article : http://www.commentcamarche.net/xml/xmlxsl.php3 +- Schéma : http://fr.wikipedia.org/wiki/Extended_stylesheet_language_transformations + +.. |presentationxsl| image:: images/presentationXSL.png + +Les différentes librairies utilisées +==================================== + +dom4j +----- + +Dom4j est une API Open Source Java permettant de travailler avec XML, XPath et XSLT. Cette bibliothèque +est compatible avec les standards DOM, SAX et JAXP. + +javax.xml.transform et Xalan +---------------------------- + +javax.xml.transform et Xalan sont deux librairies permettant la transformation XSL. + +SDoc +---- + +SDoc fournit des composants Swing qui inclut la coloration syntaxique pour de nombreux langages. + +Xmlunit +------- + +Xmlunit permet de comparer deux fichiers XML pour mettre en évidences les différences. + +dom4j : http://www.dom4j.org + +javax.xml.transform : http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/package-summary.... + +Xalan : http://xml.apache.org/xalan-j/ + +SDoc : http://sdoc.sourceforge.net/wiki/pmwiki.php + +Xmlunit : http://xmlunit.sourceforge.net/ + + +Documentation externe +===================== + +Le site de docUtils : http://docutils.sourceforge.net/rst.html + +La DTD reStructuredText : http://docutils.sourceforge.net/docs/ref/doctree.html + +Un XSL permettant de convertir le XML en RST : http://www.merten-home.de/FreeSoftware/xml2rst/ + +Pour la génération de la javaDoc en RST : http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/overview.html + + Property changes on: trunk/jrst2/src/test/resources/frEntier.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/test.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/test.rst) =================================================================== --- trunk/jrst2/src/test/resources/test.rst (rev 0) +++ trunk/jrst2/src/test/resources/test.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,315 @@ +===================================== + An Introduction to reStructuredText +===================================== +------------------------------------------------- + Markup Syntax and Parser Component of Docutils +------------------------------------------------- + +:Author: David Goodger +:Contact: goodger@python.org +:Revision: $Revision$ +:Date: $Date$ +:Copyright: This document has been placed in the public domain. + +reStructuredText_ is an easy-to-read, what-you-see-is-what-you-get +plaintext markup syntax and parser system. It is useful for inline +program documentation (such as Python docstrings), for quickly +creating simple web pages, and for standalone documents. +reStructuredText_ is a proposed revision and reinterpretation of the +StructuredText_ and Setext_ lightweight markup systems. + +reStructuredText is designed for extensibility for specific +application domains. Its parser is a component of Docutils_. + +This document defines the goals_ of reStructuredText and provides a +history_ of the project. It is written using the reStructuredText +markup, and therefore serves as an example of its use. For a gentle +introduction to using reStructuredText, please read `A +ReStructuredText Primer`_. The `Quick reStructuredText`_ user +reference is also useful. The `reStructuredText Markup +Specification`_ is the definitive reference. There is also an +analysis of the `Problems With StructuredText`_. + +ReStructuredText's web page is +http://docutils.sourceforge.net/rst.html. + +.. _reStructuredText: http://docutils.sourceforge.net/rst.html +.. _StructuredText: + http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/FrontPage +.. _Setext: http://docutils.sourceforge.net/mirror/setext.html +.. _Docutils: http://docutils.sourceforge.net/ +.. _A ReStructuredText Primer: ../../user/rst/quickstart.html +.. _Quick reStructuredText: ../../user/rst/quickref.html +.. _reStructuredText Markup Specification: restructuredtext.html +.. _Problems with StructuredText: ../../dev/rst/problems.html + +.. contents:: + +Goals +===== + +The primary goal of reStructuredText_ is to define a markup syntax for +use in Python docstrings and other documentation domains, that is +readable and simple, yet powerful enough for non-trivial use. The +intended purpose of the reStructuredText markup is twofold: + +- the establishment of a set of standard conventions allowing the + expression of structure within plaintext, and + +- the conversion of such documents into useful structured data + formats. + +The secondary goal of reStructuredText is to be accepted by the Python +community (by way of being blessed by PythonLabs and the BDFL [#]_) as +a standard for Python inline documentation (possibly one of several +standards, to account for taste). + +.. [#] Python's creator and "Benevolent Dictator For Life", + Guido van Rossum. + +To clarify the primary goal, here are specific design goals, in order, +beginning with the most important: + +1. Readable. The marked-up text must be easy to read without any + prior knowledge of the markup language. It should be as easily + read in raw form as in processed form. + +2. Unobtrusive. The markup that is used should be as simple and + unobtrusive as possible. The simplicity of markup constructs + should be roughly proportional to their frequency of use. The most + common constructs, with natural and obvious markup, should be the + simplest and most unobtrusive. Less common constructs, for which + there is no natural or obvious markup, should be distinctive. + +3. Unambiguous. The rules for markup must not be open for + interpretation. For any given input, there should be one and only + one possible output (including error output). + +4. Unsurprising. Markup constructs should not cause unexpected output + upon processing. As a fallback, there must be a way to prevent + unwanted markup processing when a markup construct is used in a + non-markup context (for example, when documenting the markup syntax + itself). + +5. Intuitive. Markup should be as obvious and easily remembered as + possible, for the author as well as for the reader. Constructs + should take their cues from such naturally occurring sources as + plaintext email messages, newsgroup postings, and text + documentation such as README.txt files. + +6. Easy. It should be easy to mark up text using any ordinary text + editor. + +7. Scalable. The markup should be applicable regardless of the length + of the text. + +8. Powerful. The markup should provide enough constructs to produce a + reasonably rich structured document. + +9. Language-neutral. The markup should apply to multiple natural (as + well as artificial) languages, not only English. + +10. Extensible. The markup should provide a simple syntax and + interface for adding more complex general markup, and custom + markup. + +11. Output-format-neutral. The markup will be appropriate for + processing to multiple output formats, and will not be biased + toward any particular format. + +The design goals above were used as criteria for accepting or +rejecting syntax, or selecting between alternatives. + +It is emphatically *not* the goal of reStructuredText to define +docstring semantics, such as docstring contents or docstring length. +These issues are orthogonal to the markup syntax and beyond the scope +of this specification. + +Also, it is not the goal of reStructuredText to maintain compatibility +with StructuredText_ or Setext_. reStructuredText shamelessly steals +their great ideas and ignores the not-so-great. + +Author's note: + + Due to the nature of the problem we're trying to solve (or, + perhaps, due to the nature of the proposed solution), the above + goals unavoidably conflict. I have tried to extract and distill + the wisdom accumulated over the years in the Python Doc-SIG_ + mailing list and elsewhere, to come up with a coherent and + consistent set of syntax rules, and the above goals by which to + measure them. + + There will inevitably be people who disagree with my particular + choices. Some desire finer control over their markup, others + prefer less. Some are concerned with very short docstrings, + others with full-length documents. This specification is an + effort to provide a reasonably rich set of markup constructs in a + reasonably simple form, that should satisfy a reasonably large + group of reasonable people. + + --David Goodger (goodger@python.org), 2001-04-20 + +.. _Doc-SIG: http://www.python.org/sigs/doc-sig/ + + +History +======= + +reStructuredText_, the specification, is based on StructuredText_ and +Setext_. StructuredText was developed by Jim Fulton of `Zope +Corporation`_ (formerly Digital Creations) and first released in 1996. +It is now released as a part of the open-source "Z Object Publishing +Environment" (ZOPE_). Ian Feldman's and Tony Sanders' earlier Setext_ +specification was either an influence on StructuredText or, by their +similarities, at least evidence of the correctness of this approach. + +I discovered StructuredText_ in late 1999 while searching for a way to +document the Python modules in one of my projects. Version 1.1 of +StructuredText was included in Daniel Larsson's pythondoc_. Although +I was not able to get pythondoc to work for me, I found StructuredText +to be almost ideal for my needs. I joined the Python Doc-SIG_ +(Documentation Special Interest Group) mailing list and found an +ongoing discussion of the shortcomings of the StructuredText +"standard". This discussion has been going on since the inception of +the mailing list in 1996, and possibly predates it. + +I decided to modify the original module with my own extensions and +some suggested by the Doc-SIG members. I soon realized that the +module was not written with extension in mind, so I embarked upon a +general reworking, including adapting it to the "re" regular +expression module (the original inspiration for the name of this +project). Soon after I completed the modifications, I discovered that +StructuredText.py was up to version 1.23 in the ZOPE distribution. +Implementing the new syntax extensions from version 1.23 proved to be +an exercise in frustration, as the complexity of the module had become +overwhelming. + +In 2000, development on StructuredTextNG_ ("Next Generation") began at +`Zope Corporation`_ (then Digital Creations). It seems to have many +improvements, but still suffers from many of the problems of classic +StructuredText. + +I decided that a complete rewrite was in order, and even started a +reStructuredText SourceForge project (now inactive). My +motivations (the "itches" I aim to "scratch") are as follows: + +- I need a standard format for inline documentation of the programs I + write. This inline documentation has to be convertible to other + useful formats, such as HTML. I believe many others have the same + need. + +- I believe in the Setext/StructuredText idea and want to help + formalize the standard. However, I feel the current specifications + and implementations have flaws that desperately need fixing. + +- reStructuredText could form part of the foundation for a + documentation extraction and processing system, greatly benefitting + Python. But it is only a part, not the whole. reStructuredText is + a markup language specification and a reference parser + implementation, but it does not aspire to be the entire system. I + don't want reStructuredText or a hypothetical Python documentation + processor to die stillborn because of over-ambition. + +- Most of all, I want to help ease the documentation chore, the bane + of many a programmer. + +Unfortunately I was sidetracked and stopped working on this project. +In November 2000 I made the time to enumerate the problems of +StructuredText and possible solutions, and complete the first draft of +a specification. This first draft was posted to the Doc-SIG in three +parts: + +- `A Plan for Structured Text`__ +- `Problems With StructuredText`__ +- `reStructuredText: Revised Structured Text Specification`__ + +__ http://mail.python.org/pipermail/doc-sig/2000-November/001239.html +__ http://mail.python.org/pipermail/doc-sig/2000-November/001240.html +__ http://mail.python.org/pipermail/doc-sig/2000-November/001241.html + +In March 2001 a flurry of activity on the Doc-SIG spurred me to +further revise and refine my specification, the result of which you +are now reading. An offshoot of the reStructuredText project has been +the realization that a single markup scheme, no matter how well +thought out, may not be enough. In order to tame the endless debates +on Doc-SIG, a flexible `Docstring Processing System framework`_ needed +to be constructed. This framework has become the more important of +the two projects; reStructuredText_ has found its place as one +possible choice for a single component of the larger framework. + +The project web site and the first project release were rolled out in +June 2001, including posting the second draft of the spec [#spec-2]_ +and the first draft of PEPs 256, 257, and 258 [#peps-1]_ to the +Doc-SIG. These documents and the project implementation proceeded to +evolve at a rapid pace. Implementation history details can be found +in the `project history file`_. + +In November 2001, the reStructuredText parser was nearing completion. +Development of the parser continued with the addition of small +convenience features, improvements to the syntax, the filling in of +gaps, and bug fixes. After a long holiday break, in early 2002 most +development moved over to the other Docutils components, the +"Readers", "Writers", and "Transforms". A "standalone" reader +(processes standalone text file documents) was completed in February, +and a basic HTML writer (producing HTML 4.01, using CSS-1) was +completed in early March. + +`PEP 287`_, "reStructuredText Standard Docstring Format", was created +to formally propose reStructuredText as a standard format for Python +docstrings, PEPs, and other files. It was first posted to +comp.lang.python_ and the Python-dev_ mailing list on 2002-04-02. + +Version 0.4 of the reStructuredText__ and `Docstring Processing +System`_ projects were released in April 2002. The two projects were +immediately merged, renamed to "Docutils_", and a 0.1 release soon +followed. + + +.. [#spec-2] The second draft of the spec: + + - `An Introduction to reStructuredText`__ + - `Problems With StructuredText`__ + - `reStructuredText Markup Specification`__ + - `Python Extensions to the reStructuredText Markup Specification`__ + + __ http://mail.python.org/pipermail/doc-sig/2001-June/001858.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001859.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001860.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001861.html + +.. [#peps-1] First drafts of the PEPs: + + - `PEP 256: Docstring Processing System Framework`__ + - `PEP 258: DPS Generic Implementation Details`__ + - `PEP 257: Docstring Conventions`__ + + Current working versions of the PEPs can be found in + http://docutils.sourceforge.net/docs/peps/, and official versions + can be found in the `master PEP repository`_. + + __ http://mail.python.org/pipermail/doc-sig/2001-June/001855.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001856.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001857.html + + +.. _Zope Corporation: http://www.zope.com +.. _ZOPE: http://www.zope.org +.. _pythondoc: http://starship.python.net/crew/danilo/pythondoc/ +.. _StructuredTextNG: + http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/StructuredTextNG +.. _project history file: ../../../HISTORY.html +.. _PEP 287: ../../peps/pep-0287.html +.. _Docstring Processing System framework: ../../peps/pep-0256.html +.. _comp.lang.python: news:comp.lang.python +.. _Python-dev: http://mail.python.org/pipermail/python-dev/ +.. _Docstring Processing System: http://docstring.sourceforge.net/ +.. _master PEP repository: http://www.python.org/peps/ + + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: Property changes on: trunk/jrst2/src/test/resources/test.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/test2.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/test2.rst) =================================================================== --- trunk/jrst2/src/test/resources/test2.rst (rev 0) +++ trunk/jrst2/src/test/resources/test2.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,318 @@ +===================================== + An Introduction to reStructuredText +===================================== +------------------------------------------------- + Markup Syntax and Parser Component of Docutils +------------------------------------------------- + +:Author: David Goodger +:Contact: goodger@python.org +:Revision: $Revision$ +:Date: $Date$ +:Copyright: This document has been placed in the public domain. + +reStructuredText_ is an easy-to-read, what-you-see-is-what-you-get +plaintext markup syntax and parser system. It is useful for inline +program documentation (such as Python docstrings), for quickly +creating simple web pages, and for standalone documents. +reStructuredText_ is a proposed revision and reinterpretation of the +StructuredText_ and Setext_ lightweight markup systems. + +reStructuredText is designed for extensibility for specific +application domains. Its parser is a component of Docutils_. + +This document defines the goals_ of reStructuredText and provides a +history_ of the project. It is written using the reStructuredText +markup, and therefore serves as an example of its use. For a gentle +introduction to using reStructuredText, please read `A +ReStructuredText Primer`_. The `Quick reStructuredText`_ user +reference is also useful. The `reStructuredText Markup +Specification`_ is the definitive reference. There is also an +analysis of the `Problems With StructuredText`_. + +ReStructuredText's web page is +http://docutils.sourceforge.net/rst.html. + +.. _reStructuredText: http://docutils.sourceforge.net/rst.html +.. _StructuredText: + http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/FrontPage +.. _Setext: http://docutils.sourceforge.net/mirror/setext.html +.. _Docutils: http://docutils.sourceforge.net/ +.. _A ReStructuredText Primer: ../../user/rst/quickstart.html +.. _Quick reStructuredText: ../../user/rst/quickref.html +.. _reStructuredText Markup Specification: restructuredtext.html +.. _Problems with StructuredText: ../../dev/rst/problems.html + +.. contents:: + +Goals +===== + +The primary goal of reStructuredText_ is to define a markup syntax for +use in Python docstrings and other documentation domains, that is +readable and simple, yet powerful enough for non-trivial use. The +intended purpose of the reStructuredText markup is twofold: + +- the establishment of a set of standard conventions allowing the + expression of structure within plaintext, and + +- the conversion of such documents into useful structured data + formats. + +The secondary goal of reStructuredText is to be accepted by the Python +community (by way of being blessed by PythonLabs and the BDFL [#]_) as +a standard for Python inline documentation (possibly one of several +standards, to account for taste). + +.. [#] Python's creator and "Benevolent Dictator For Life", + Guido van Rossum. + +To clarify the primary goal, here are specific design goals, in order, +beginning with the most important: + +1. Readable. The marked-up text must be easy to read without any + prior knowledge of the markup language. It should be as easily + read in raw form as in processed form. + +2. Unobtrusive. The markup that is used should be as simple and + unobtrusive as possible. The simplicity of markup constructs + should be roughly proportional to their frequency of use. The most + common constructs, with natural and obvious markup, should be the + simplest and most unobtrusive. Less common constructs, for which + there is no natural or obvious markup, should be distinctive. + +3. Unambiguous. The rules for markup must not be open for + interpretation. For any given input, there should be one and only + one possible output (including error output). + +4. Unsurprising. Markup constructs should not cause unexpected output + upon processing. As a fallback, there must be a way to prevent + unwanted markup processing when a markup construct is used in a + non-markup context (for example, when documenting the markup syntax + itself). + +5. Intuitive. Markup should be as obvious and easily remembered as + possible, for the author as well as for the reader. Constructs + should take their cues from such naturally occurring sources as + plaintext email messages, newsgroup postings, and text + documentation such as README.txt files. + +6. Easy. It should be easy to mark up text using any ordinary text + editor. + +7. Scalable. The markup should be applicable regardless of the length + of the text. + +8. Powerful. The markup should provide enough constructs to produce a + reasonably rich structured document. + +9. Language-neutral. The markup should apply to multiple natural (as + well as artificial) languages, not only English. + +10. Extensible. The markup should provide a simple syntax and + interface for adding more complex general markup, and custom + markup. + +11. Output-format-neutral. The markup will be appropriate for + processing to multiple output formats, and will not be biased + toward any particular format. + +The design goals above were used as criteria for accepting or +rejecting syntax, or selecting between alternatives. + +It is emphatically *not* the goal of reStructuredText to define +docstring semantics, such as docstring contents or docstring length. +These issues are orthogonal to the markup syntax and beyond the scope +of this specification. + +Also, it is not the goal of reStructuredText to maintain compatibility +with StructuredText_ or Setext_. reStructuredText shamelessly steals +their great ideas and ignores the not-so-great. + +Author's note: + + Due to the nature of the problem we're trying to solve (or, + perhaps, due to the nature of the proposed solution), the above + goals unavoidably conflict. I have tried to extract and distill + the wisdom accumulated over the years in the Python Doc-SIG_ + mailing list and elsewhere, to come up with a coherent and + consistent set of syntax rules, and the above goals by which to + measure them. + + There will inevitably be people who disagree with my particular + choices. Some desire finer control over their markup, others + prefer less. Some are concerned with very short docstrings, + others with full-length documents. This specification is an + effort to provide a reasonably rich set of markup constructs in a + reasonably simple form, that should satisfy a reasonably large + group of reasonable people. + + --David Goodger (goodger@python.org), 2001-04-20 + +.. _Doc-SIG: http://www.python.org/sigs/doc-sig/ + + +History +======= + +reStructuredText_, the specification, is based on StructuredText_ and +Setext_. StructuredText was developed by Jim Fulton of `Zope +Corporation`_ (formerly Digital Creations) and first released in 1996. +It is now released as a part of the open-source "Z Object Publishing +Environment" (ZOPE_). Ian Feldman's and Tony Sanders' earlier Setext_ +specification was either an influence on StructuredText or, by their +similarities, at least evidence of the correctness of this approach. + +I discovered StructuredText_ in late 1999 while searching for a way to +document the Python modules in one of my projects. Version 1.1 of +StructuredText was included in Daniel Larsson's pythondoc_. Although +I was not able to get pythondoc to work for me, I found StructuredText +to be almost ideal for my needs. I joined the Python Doc-SIG_ +(Documentation Special Interest Group) mailing list and found an +ongoing discussion of the shortcomings of the StructuredText +"standard". This discussion has been going on since the inception of +the mailing list in 1996, and possibly predates it. + +I decided to modify the original module with my own extensions and +some suggested by the Doc-SIG members. I soon realized that the +module was not written with extension in mind, so I embarked upon a +general reworking, including adapting it to the "re" regular +expression module (the original inspiration for the name of this +project). Soon after I completed the modifications, I discovered that +StructuredText.py was up to version 1.23 in the ZOPE distribution. +Implementing the new syntax extensions from version 1.23 proved to be +an exercise in frustration, as the complexity of the module had become +overwhelming. + +In 2000, development on StructuredTextNG_ ("Next Generation") began at +`Zope Corporation`_ (then Digital Creations). It seems to have many +improvements, but still suffers from many of the problems of classic +StructuredText. + +I decided that a complete rewrite was in order, and even started a +`reStructuredText SourceForge project`_ (now inactive). My +motivations (the "itches" I aim to "scratch") are as follows: + +- I need a standard format for inline documentation of the programs I + write. This inline documentation has to be convertible to other + useful formats, such as HTML. I believe many others have the same + need. + +- I believe in the Setext/StructuredText idea and want to help + formalize the standard. However, I feel the current specifications + and implementations have flaws that desperately need fixing. + +- reStructuredText could form part of the foundation for a + documentation extraction and processing system, greatly benefitting + Python. But it is only a part, not the whole. reStructuredText is + a markup language specification and a reference parser + implementation, but it does not aspire to be the entire system. I + don't want reStructuredText or a hypothetical Python documentation + processor to die stillborn because of over-ambition. + +- Most of all, I want to help ease the documentation chore, the bane + of many a programmer. + +Unfortunately I was sidetracked and stopped working on this project. +In November 2000 I made the time to enumerate the problems of +StructuredText and possible solutions, and complete the first draft of +a specification. This first draft was posted to the Doc-SIG in three +parts: + +- `A Plan for Structured Text`__ +- `Problems With StructuredText`__ +- `reStructuredText: Revised Structured Text Specification`__ + +__ http://mail.python.org/pipermail/doc-sig/2000-November/001239.html +__ http://mail.python.org/pipermail/doc-sig/2000-November/001240.html +__ http://mail.python.org/pipermail/doc-sig/2000-November/001241.html + +In March 2001 a flurry of activity on the Doc-SIG spurred me to +further revise and refine my specification, the result of which you +are now reading. An offshoot of the reStructuredText project has been +the realization that a single markup scheme, no matter how well +thought out, may not be enough. In order to tame the endless debates +on Doc-SIG, a flexible `Docstring Processing System framework`_ needed +to be constructed. This framework has become the more important of +the two projects; reStructuredText_ has found its place as one +possible choice for a single component of the larger framework. + +The project web site and the first project release were rolled out in +June 2001, including posting the second draft of the spec [#spec-2]_ +and the first draft of PEPs 256, 257, and 258 [#peps-1]_ to the +Doc-SIG. These documents and the project implementation proceeded to +evolve at a rapid pace. Implementation history details can be found +in the `project history file`_. + +In November 2001, the reStructuredText parser was nearing completion. +Development of the parser continued with the addition of small +convenience features, improvements to the syntax, the filling in of +gaps, and bug fixes. After a long holiday break, in early 2002 most +development moved over to the other Docutils components, the +"Readers", "Writers", and "Transforms". A "standalone" reader +(processes standalone text file documents) was completed in February, +and a basic HTML writer (producing HTML 4.01, using CSS-1) was +completed in early March. + +`PEP 287`_, "reStructuredText Standard Docstring Format", was created +to formally propose reStructuredText as a standard format for Python +docstrings, PEPs, and other files. It was first posted to +comp.lang.python_ and the Python-dev_ mailing list on 2002-04-02. + +Version 0.4 of the reStructuredText__ and `Docstring Processing +System`_ projects were released in April 2002. The two projects were +immediately merged, renamed to "Docutils_", and a 0.1 release soon +followed. + +.. __: `reStructuredText SourceForge project`_ + +.. [#spec-2] The second draft of the spec: + + - `An Introduction to reStructuredText`__ + - `Problems With StructuredText`__ + - `reStructuredText Markup Specification`__ + - `Python Extensions to the reStructuredText Markup Specification`__ + + __ http://mail.python.org/pipermail/doc-sig/2001-June/001858.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001859.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001860.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001861.html + +.. [#peps-1] First drafts of the PEPs: + + - `PEP 256: Docstring Processing System Framework`__ + - `PEP 258: DPS Generic Implementation Details`__ + - `PEP 257: Docstring Conventions`__ + + Current working versions of the PEPs can be found in + http://docutils.sourceforge.net/docs/peps/, and official versions + can be found in the `master PEP repository`_. + + __ http://mail.python.org/pipermail/doc-sig/2001-June/001855.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001856.html + __ http://mail.python.org/pipermail/doc-sig/2001-June/001857.html + + +.. _Zope Corporation: http://www.zope.com +.. _ZOPE: http://www.zope.org +.. _reStructuredText SourceForge project: + http://structuredtext.sourceforge.net/ +.. _pythondoc: http://starship.python.net/crew/danilo/pythondoc/ +.. _StructuredTextNG: + http://www.zope.org/DevHome/Members/jim/StructuredTextWiki/StructuredTextNG +.. _project history file: ../../../HISTORY.html +.. _PEP 287: ../../peps/pep-0287.html +.. _Docstring Processing System framework: ../../peps/pep-0256.html +.. _comp.lang.python: news:comp.lang.python +.. _Python-dev: http://mail.python.org/pipermail/python-dev/ +.. _Docstring Processing System: http://docstring.sourceforge.net/ +.. _master PEP repository: http://www.python.org/peps/ + + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: Property changes on: trunk/jrst2/src/test/resources/test2.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/test3.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/test3.rst) =================================================================== --- trunk/jrst2/src/test/resources/test3.rst (rev 0) +++ trunk/jrst2/src/test/resources/test3.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,93 @@ +====================== +Introduction to Prest +====================== +:Author: Mark Nodine +:Contact: mnodine@alum.mit.edu +:Revision: $Revision$ +:Date: $Date$ +:Copyright: This document has been placed in the public domain. + +.. contents:: + +-------------- + Introduction +-------------- + +This document gives an introduction to the ``prest`` program, which is +a Perl implementation of a reStructuredText_ parser (and writers) and +gives a map of the documentation. + +.. _reStructuredText: http://docutils.sourceforge.net/rst.html + +reStructuredText_ is an easy-to-read, what-you-see-is-what-you-get +plaintext markup syntax and parser system. It is useful for inline +program documentation (such as Python docstrings), for quickly +creating simple web pages, and for standalone documents. This web +page was generated from reStructuredText. The original implementation +of a reStructuredText parser is that of the docutils_ project, written +in Python. The "prest" name is an acronym for "**P**\ erl +**reS**\ tructured\ **T**\ ext". + +.. _docutils: http://docutils.sourceforge.net + +--------------- + Documentation +--------------- + +Since prest is a re-implementation of a reStructuredText parser, it has +diverged from the original Python version, both because the Python +version has made changes not tracked by the Perl version and because +the Perl version has added some innovations of its own. So the +documentation references have potentially three versions: the prest +version, the Docutils version, and a difference between the two. +The difference is based on the latest Docutils version available when +the prest documentation was compiled. + +======================================== ================= ==================== ====== +A ReStructuredText Primer `docutils version`__ +Quick reStructuredText `docutils version`__ +An Introduction to reStructuredText `prest version`__ `docutils version`__ diff__ +reStructuredText Markup Specification `prest version`__ `docutils version`__ diff__ +reStructuredText Directives `prest version`__ `docutils version`__ diff__ +reStructuredText Interpreted Text Roles `prest version`__ `docutils version`__ diff__ +Usage of Prest `prest version`__ +Internals of Prest `prest version`__ +How to Extend Prest `prest version`__ +Prest Release Notes `prest version`__ +======================================== ================= ==================== ====== + +__ http://docutils.sourceforge.net/docs/rst/quickstart.html + +__ http://docutils.sourceforge.net/docs/rst/quickref.html + +__ introduction.html +__ http://docutils.sourceforge.net/docs/ref/rst/introduction.html +__ introduction_diff.html + +__ reStructuredText.html +__ http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html +__ reStructuredText_diff.html + +__ directives.html +__ http://docutils.sourceforge.net/docs/ref/rst/directives.html +__ directives_diff.html + +__ roles.html +__ http://docutils.sourceforge.net/docs/ref/rst/roles.html +__ roles_diff.html + +__ prest_usage.html + +__ prest_internals.html + +__ prest_extend.html + +__ prest_releases.html + +.. + Local Variables: + mode: indented-text + indent-tabs-mode: nil + sentence-end-double-space: t + fill-column: 70 + End: Property changes on: trunk/jrst2/src/test/resources/test3.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/test4.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/test4.rst) =================================================================== --- trunk/jrst2/src/test/resources/test4.rst (rev 0) +++ trunk/jrst2/src/test/resources/test4.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,406 @@ +===================================== +Tutoriel pour la création d'un module +===================================== + +:Author: Ruchaud Julien <ruchaud@codelutin.com> +:Revision: $Revision$ +:Date: $Date$ + +.. contents:: + + +Exemple +------- + +Ce tutoriel montre le développement d'un module en reprenant les différentes parties de la documentation développeur. L'exemple traité est la gestion électronique de documents. Le module GED est limité à un modèle super simple. + +Les fonctionnalités du module GED sont les suivantes : + +- Ajout/Suppression de documents +- Visualisation de la liste des documents + +Les différents fichiers de notre module seront répartis dans les répertoires suivants : + +- pour le modèle : /src/xmi +- pour la vue : /src/webapp/WEB-INF/ged +- pour le contrôleur : /src/java/web/mentawai/ged + + +Modèle +------ + + +Etape 1 : Création du modèle sur ArgoUML +++++++++++++++++++++++++++++++++++++++++ + +Le modèle est le plus simple possible, il ne comporte qu'une seule classe, Document. Elle définie un document avec son nom et sa description. + +:: + + +----------------------------------+ + | «entity» | + | Document | + +----------------------------------+ + | name : String | + | description : String | + +----------------------------------+ + | getNameAndDescription() : String | + +----------------------------------+ + +Le modèle est à créer dans le fichier /src/xmi/chorem.zargo dans le paquetage org.codelutin.chorem.entities.ged. On remarque que la classe porte le stéréotype Entity, ceci permet d'indiquer que Topia se chargera de la génération de cette classe ainsi que de sa persistance. + + +Etape 2 : Génération du code avec ToPIA ++++++++++++++++++++++++++++++++++++++++ + +Le plugin Maven 2 Generator se charge de lancer la génération de ToPIA. Par la commande "mvn compile", nous lançons la compilation du projet ainsi que la génération ToPIA. Nous obtenons les classes Java et les fichiers de mapping Hibernate dans le répertoire /src/gen/java/org/codelutin/chorem/entities/ged. +Le projet ne compile pas car il ne trouve pas l'implémentation des méthodes du modèle : + +:: + + [INFO] Compilation failure + /chorem3/target/src-build/java/org/codelutin/chorem/ChoremDAOHelper.java:[76,41] cannot find symbol + symbol : class DocumentImpl + location: package org.codelutin.chorem.entities.ged + + +Etape 3 : Implémentation des méthodes ++++++++++++++++++++++++++++++++++++++ + +Les méthodes contenues dans le modèle n'étant pas implémentées, il est maintenant nécessaire de les complèter. Elles sont a compléter dans le répertoire /src/java/org/codelutin/chorem/entities/ged et porte comme nom, le nom de classe avec le suffixe "Impl". Elle doivent hériter de sa classe abstraite et implémenter son interface. + +:: + + public class DocumentImpl extends DocumentAbstract implements Document { + public String getNameAndDescription() { + return getName() + " " + getDescription(); + } + } + +Maintenant la compilation (mvn compile) ne doit plus produire d'erreur. + + +Etape 4 : Modification des classes de persistances +++++++++++++++++++++++++++++++++++++++++++++++++++ + +La propriété topia.persistence.classes dans le fichier /src/ressources/TopiaContextImpl.properties doit contenir la classe Document. + +:: + + topia.persistence.classes=...,org.codelutin.chorem.entities.ged.DocumentImpl,... + + +Vue +--- + + +Etape 5 : Déclaration du module au niveau du Layout ++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Il faut déclarer le nom du module dans les fichiers de langue dans le répertoire /src/webapp/WEB-INF/common/lang. + +:: + + ged = GED + +Après, il faut ajouter le module dans l'entête, fichier /src/webapp/WEB-INF/common/layout/layout.jsp, pour pouvoir donner l'accès à celui-ci. + +:: + + | <a class="Link" href="${path}/ged.mtw"><fmt:message key="ged" bundle="${commonBundle}"/></a> + + +Etape 6 : Création du menu +++++++++++++++++++++++++++ + +Chaque module a son propre menu. Il faut créer le fichier /src/webapp/ged/common/menu.jsp pour ajouter un menu au module GED. + +:: + + <%@ include file="/WEB-INF/common/taglibs.jsp"%> + <h1 class="tab" onclick="tabHideShow('tabMenu');"><fmt:message key="tabMenu.title"/></h1> + <div id="tabMenu" class="${cookie.tabMenu.value}"> + <h2 class="Title"><fmt:message key="tabMenu.shortcuts"/></h2> + <menu class="Menu"> + <li><a class="Link" href="${pathModule}/ged.mtw"><fmt:message key="tabMenu.shortcuts.ged"/></a></li> + </menu> + </div> + + <jsp:include page="${common}/layout/tabSpace.jsp"/> + + +Etape 7 : Création des pages +++++++++++++++++++++++++++++ + +Il faut créer les pages JSP de visualisation du module. Quelques règles sont à respecter : + 1. Il faut toujours regarder et recopier ce qui a été fait. + 2. Tous les formulaires doivent être créés avec le tag chorem:action. + 3. Aucun texte doit être fixe dans la page, il faut utiliser fmt:message. + +Les deux fichiers sont stockés dans le répertoire /src/webapp/ged/document. + +Le fichier list.jsp permet de visualiser la liste des documents : + +:: + + <%@ include file="/WEB-INF/common/taglibs.jsp"%> + <jsp:include page="${headerPage}"/> + + <h1 class="Title"><fmt:message key="document.list.title"/></h1><hr class="Ligne"/> + + <div class="FormActions"> + <chorem:action mtw="${pathModule}/document/new.mtw"> + <input type="submit" value="<fmt:message key="button.new" bundle="${commonBundle}"/>"> + </chorem:action> + </div> + + <div class="Container"> + <table class="Large"> + <tr class="First"> + <td><fmt:message key="document.list.name"/></td> + <td><fmt:message key="document.list.description"/></td> + </tr> + + <mtw:list value="documents"> + <mtw:isEmpty><td colspan="2" align="center"><fmt:message key="document.list.empty"/></td></mtw:isEmpty> + + <mtw:loop var="eltDocument"> + <tr> + <td>${eltDocument.name}</td> + <td>${eltDocument.description}</td> + <td class="Actions"> + <chorem:action mtw="${pathModule}/document/del.mtw"> + <input type="hidden" name="documentId" value ="${eltDocument.topiaId}"> + <input type="submit" value="<fmt:message key="button.delete" bundle="${commonBundle}"/>"> + </chorem:action> + </td> + </tr> + </mtw:loop> + </mtw:list> + </table> + </div> + + +Le fichier form.jsp permet de modifier ou creer un nouveau document : + +:: + + <%@ include file="/WEB-INF/common/taglibs.jsp"%> + <jsp:include page="${headerPage}"/> + <h1 class="Title"><fmt:message key="document.form.title"/></h1><hr class="Ligne"/> + + <!-- Partie enregistrement --> + <chorem:action name="store" mtw="${pathModule}/document/store.mtw"> + <div class="Container"> + <div class="FormLeft"> + <div class="Text"><fmt:message key="document.form.name"/></div> + <div class="Text"><fmt:message key="document.form.description"/></div> + </div> + + <div class="FormRight"> + <div class="Normal"> + <input type="text" name="name" value="${document.name}"/> + </div> + <div class="Normal"> + <input type="text" name="description" value="${document.description}"/> + </div> + </div> + </div> + </chorem:action> + + <!-- Partie annulation --> + <chorem:action name="cancel" mtw="${pathModule}/document/cancel.mtw"/> + + <!-- Partie actions --> + <div class="FormActions"> + <button onclick="document.cancel.submit();"><fmt:message key="button.cancel" bundle="${commonBundle}"/></button> + <button onclick="document.store.submit();"><fmt:message key="button.store" bundle="${commonBundle}"/></button> + </div> + + +Etape 8 : Internationalisation +++++++++++++++++++++++++++++++ + +Pour finir les pages jsp, il faut créer les fichiers de langue dans le répertoire /src/webapp/WEB-INF/ged/common/lang. De plus, il faut rajouter ce répertoire comme ressource dans le pom.xml de Maven. + + +Fichier de langue pour le français est ged_fr.properties, il contient : + +:: + + ## Menu ## + tabMenu.title = Menu + tabMenu.shortcuts = Raccourcis + tabMenu.shortcuts.ged = Documents + + ## Document ## + document.list.title = Liste des documents + document.list.empty = Vide + document.list.name = Nom + document.list.description = Description + + document.form.title = Liste des documents + document.form.name = Nom : + document.form.description = Description : + +Généralement les clés sont de la forme suivante : "nom de l'entité"."nom de la page"."nom de l'élément" = ... + +Le bundle commun (${commonBundle}) contient l'ensemble des traductions transversales à tous les modules. + + +Contrôleur +---------- + + +Etape 9 : Création des actions +++++++++++++++++++++++++++++++ + +Quatres actions sont toujours créer pour chaque entités du modèle, elles permettent les manipulations de base. Elles sont stockées dans le package actions du module. + +Ces actions vont être nécessaire pour notre exemple les voici, elle doit être dans src/java/org/codelutin/chorem/web/mentawai/ged/action/document : + +DocumentFindId.java, permet de rechercher un document par rapport à son identifiant : + +:: + + public class DocumentFindId extends ElementaryAction { + @TopiaBean + private Document document; + + public void action() throws Exception { + } + } + +DocumentFindAll.java, permet de récupérer l'ensemble des documents : + +:: + + public class DocumentFindAll extends ElementaryAction { + public void action() throws Exception { + DocumentDAO documentPS = ChoremDAOHelper.getDocumentDAO(transaction); + output.setValue("documents", documentPS.findAll()); + } + } + +DocumentUpdate.java, permet de créer et de modifier un document : + +:: + + public class DocumentUpdate extends ElementaryAction implements Validatable { + @TopiaBean(recuperation = true) + private Document document; + + public void action() throws Exception { + document.update(); + addMessage(MESSAGE_STORE); + } + + public void initValidator(Validator validator, String innerAction) { + super.initValidator(validator, innerAction); + addRule(RequiredFieldRule.class, "name"); + } + } + + +DocumentDelete.java, permet la suppression d'un document : + +:: + + public class DocumentDelete extends ElementaryAction { + @TopiaBean + private Document document; + + public void action() throws Exception { + document.delete(); + addMessage(MESSAGE_DELETE); + } + } + + +Etape 10 : Création du Manageur ++++++++++++++++++++++++++++++++ + +Le manageur centralise l'ensemble des urls, des pages et des cas d'utilisation avec les actions associées. Pour la GED la classe à créer est src/java/org/codelutin/chorem/web/mentawai/ged/Manager.java : + +:: + + public class Manager extends org.codelutin.chorem.web.mentawai.Manager { + public static String DOCUMENT_LIST_JSP = "/WEB-INF/ged/document/list.jsp"; + public static String DOCUMENT_FORM_JSP = "/WEB-INF/ged/document/form.jsp"; + public static String DOCUMENT_DEL = "ged/document/del"; + public static String DOCUMENT_NEW = "ged/document/new"; + public static String DOCUMENT_MODIFY = "ged/document/modify"; + public static String DOCUMENT_STORE = "ged/document/store"; + public static String DOCUMENT_CANCEL = "ged/document/cancel"; + + public void loadActions() { + // Actions de l'utilisateur + createFirstLine(DOCUMENT_DEL, DocumentDelete.class); + createFirstLine(DOCUMENT_NEW, SuccessAction.class); + createFirstLine(DOCUMENT_MODIFY, SuccessAction.class); + createFirstLine(DOCUMENT_STORE, DocumentUpdate.class); + createFirstLine(DOCUMENT_CANCEL, SuccessAction.class); + // JSP et actions liées + createLastLine(DOCUMENT_LIST_JSP, DocumentFindAll.class); + createLastLine(DOCUMENT_FORM_JSP, DocumentFindId.class); + } + } + + +Etape 11 : Création des cas d'utilisation ++++++++++++++++++++++++++++++++++++++++++ + +Il faut maintenant créer les cas d'utilisation. Pour notre module, un seul suffit, aucune page ne présente de comportements différents. La classe à créer est src/java/org/codelutin/chorem/web/mentawai/ged/usecase/DocumentUseCase.java : + +:: + + public class DocumentUseCase extends UseCase { + public String general() throws Exception { + // En partant de la liste des docs on retourne sur cette liste en supprimant un doc ou on accède au formulaire de création + accessPoint(DOCUMENT_LIST_JSP).move(DOCUMENT_DEL, DOCUMENT_LIST_JSP).move(DOCUMENT_NEW, DOCUMENT_FORM_JSP); + + // En partant du formulaire de création on retourne à la liste des docs en validant la création ou en l'annulant + access(DOCUMENT_FORM_JSP, "documentId").move(DOCUMENT_CANCEL, DOCUMENT_LIST_JSP).move(DOCUMENT_STORE, DOCUMENT_LIST_JSP); + + return super.execute(); + } + } + + +Ajoutons ensuite le cas d'utilisation au manageur du module : + +:: + + public class Manager extends org.codelutin.chorem.web.mentawai.Manager { + + public static String DOCUMENT_USE_CASE = "ged/general"; + + public void loadActions() { + // Cas d'utilisation + createUseCase(DOCUMENT_USE_CASE, DocumentUseCase.class); + createAccessModule("ged", DOCUMENT_USE_CASE); + } + } + + +Etape 12 : Déclaration du module +++++++++++++++++++++++++++++++++ + +Il est nécessaire d'ajouter le chargement du manageur du module GED dans le manageur global de Chorem (src/java/org/codelutin/chorem/web/mentawai/Manager.java) : + +:: + + /* GED */ + modules.add(new org.codelutin.chorem.web.mentawai.ged.Manager()); + + +Test +---- + + +Etape 13 : Démarrer Chorem +++++++++++++++++++++++++++ + + +Etape 14 : Tester le nouveau module ++++++++++++++++++++++++++++++++++++ Property changes on: trunk/jrst2/src/test/resources/test4.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/text.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/text.rst) =================================================================== --- trunk/jrst2/src/test/resources/text.rst (rev 0) +++ trunk/jrst2/src/test/resources/text.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,375 @@ +============== +Le grand titre +============== + +---------- + subtitle +---------- + +.. include:: /home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/textHeader.rst + +.. sectnum:: + + +------------------ + + +.. contents:: Sommaire + :depth: 3 + + + +L'abstract de l'article + +Le premier titre +================ + +Un paragraphe + +Un autre paragraphe + +Un sous titre +------------- + +Un para de la sous section + +Un autre sous titre +------------------- + +Un autre para + +Le *deuxime* titre +================== + +*avec* un para sur **plusieurs +ligne** histoire de *voir* + +et un autre ``para aussi **sur +plusieurs lignes** mais sans gras`` + +LISTES +------ + +- une petite liste +- qui contient +- plusieurs elements + et meme sur plusieur ligne + + voir meme avec plusieurs paragraphe + et des liens http://www.codelutin.com + + encore un petit + +- et la suite de la liste +- pour finir + +3. et meme + +4. des enum + +#. pour voir + +I) de tout + +II) sorte + +(a) pour tout + +(b) tester + +(#) vraiment tout + +FIELD +----- + +:un peu: de field + ca ne fait pas + de mal + + +:field1: avec un + petit texte + + - et meme un + - debut + - de list +:field2: todo + +DEFINITIONS +----------- + +un autre mot + une autre definition + +le mot : la classe + la definition + + avec un autre para + sur plusieurs lignes:: + + Et meme + avec *des* + ligne a + + preserver + tel quelles + sont + +le mot : la classe 1 : la classe 2 + la definition + + +SEPARATION +---------- + +avant + +----------------------------- + +apres + +Un tire +------- + +Un mini titre +~~~~~~~~~~~~~ + +Un autre encore plus mini qui ne sera pas afficher dans le sommaire +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Litteral +-------- + +:: + + public int unread(String [] lines, boolean addNewLine) { + int result = 0; + for (String line : lines) { + result += unread(line, addNewLine); + } + return result; + } + +un para 0 + + un para pluie + de 2 + +TABLE COMPLEXE +-------------- + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++------------------------+------------+----------+----------+ +| body row 2 | Cells may span columns. | ++------------------------+------------+---------------------+ +| body row 3 | Cells may | - Table cells | ++------------------------+ span rows. | - contain | +| body row 4 | | - body elements. | ++------------------------+------------+---------------------+ + ++------------------------+------------+---------------------+ +| body row 3 | Cells may | - Table cells | ++------------------------+ span rows. | - contain | +| body row 4 | | - body elements. | ++------------------------+------------+---------------------+ + +TABLE SIMPLE +------------ + +================ ============================================================ +Bullet list * items begin with "-", "+", or "*" +Enumerated list 1. items use any variation of "1.", "A)", and "(i)" + #. also auto-enumerated +Definition list Term is flush-left : optional classifier + Definition is indented, no blank line between +Field list :field name: field body +Option list -o at least 2 spaces between option & description +================ ============================================================ + + +===== ===== ====== + Inputs Output +------------ ------ + A B AorB +------------ ------ + A B A or B +===== ===== ====== +False False Second column of row 1. +True False Second column of row 2. +True 2 - Second column of row 3. + - Second item in bullet + list (row 3, column 2). +===== ===== ====== + +IMAGE +----- + +The |the big: biohazard| symbol must be used on containers used to dispose of medical waste. + +.. |the big: biohazard| image:: biohazard.png + +LIEN INLINE +----------- + +Une *petit* phare `pour avoir <http://www.free.fr>`_ un lien inline + +FIELD +----- + +:field1: def1 +:field2: def2 + +:field1: autre def1 +:field2: autre def2 + +ADMONITIONS +----------- + +.. admonition:: And, by the way... + + You can make up your own admonition too. + + :field1: autre def1 + :field2: autre def2 + +.. Attention:: All your base are belong to us. + You can make + +.. WARNING::The "raw" role is a stop-gap measure allowing the author to bypass:: + reStructuredText's markup. It is a "power-user" feature that + should not be overused or abused. The use of "raw" ties documents + to specific output formats and makes them less portable. + + If you often need to use "raw"-derived interpreted text roles or + the "raw" directive, that is a sign either of overuse/abuse or that + functionality may be missing from reStructuredText. Please + describe your situation in a message to the Docutils-users mailing + list. + + +.. admonition:: The "raw" role is a stop-gap measure allowing the author to bypass:: + reStructuredText's markup. It is a "power-user" feature that + should not be overused or abused. The use of "raw" ties documents + to specific output formats and makes them less portable. + + If you often need to use "raw"-derived interpreted text roles or + the "raw" directive, that is a sign either of overuse/abuse or that + functionality may be missing from reStructuredText. Please + describe your situation in a message to the Docutils-users mailing + list. + + + +.. Attention:: Derrière toi c'est horrible ! + + +.. admonition:: Ceci est un avertissement. + + Je vous demande de vous arrêtez. + +BLOCK QUOTE +----------- + +As a great paleontologist once said, + + This theory, that is mine, is mine. + + -- Anne Elk (Miss) + +DOCTEST BLOCK +------------- + +>>> print 'this is a Doctest block' +this is a Doctest block + +LINE BLOC +--------- + +| A one, two, a one two three four +| +| Half a bee, philosophically, +| must, *ipso facto*, half not be. +| But half the bee has got to be, +| *vis a vis* its entity. D'you see? +| +| But can a bee be said to be +| or not to be an entire bee, +| when half the bee is not a bee, +| due to some ancient injury? +| +| Singing... + +SIDEBAR +------- + +.. sidebar:: Title + :subtitle: If Desired + + Body. + +TOPIC +----- + +.. topic:: Title + + Body. + +.. header:: Ceci est une page de test + +.. footer:: Cree par **LETELLIER Sylvain** + +OPTION +------ + +-a command-line option "a" +-1 file, --one=file, --two file Multiple options with arguments. + +FOOTNOTES +--------- + +[#]_ is a reference to footnote 1, and [#]_ is a reference to +footnote 2. + +.. [#] This is footnote 1. +.. [#] This is footnote 2. +.. [#] This is footnote 3. + +[#]_ is a reference to footnote 3. + + +HYPERLINK +--------- + +it's an anonymous-hyperlink__ and this one is an simple hyperlink_ + +__ http://www.google.fr + +.. _hyperlink: http://www.google.fr + +COMMENT +------- + +.. + Ceci est un commentaire + +INLINE +------ + +``literal``, *emphasis*, **STRONG**, http://www.reference.com, letellier@codelutin.com + +INCLUDE +------- + +.. include:: literal + /home/letellier/PROJET/jrst2/src/test/org/codelutin/jrst/textLiteral.txt + +la derniere ligne. + + + + + Property changes on: trunk/jrst2/src/test/resources/text.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/textEntier.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/textEntier.rst) =================================================================== --- trunk/jrst2/src/test/resources/textEntier.rst (rev 0) +++ trunk/jrst2/src/test/resources/textEntier.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,380 @@ +============== +Le grand titre +============== + +---------- + subtitle +---------- + +:authors: Benjamin POUSSIN <poussin@codelutin> ; Sylvain LETELLIER <letellier@codelutin> +:organization: Code Lutin +:address: 6 chemin des Orans + 44240 La Chapelle sur Erdre +:version: 2.1 +:status: a finir +:revision: 51 +:date: $date: 28/10/2006$ +:Un champs: au milieu + de null part + + avec meme un para +:copyright: © 2007. JRST - Code Lutin - GPL + +------------------ + +.. sectnum:: + +.. contents:: sommaire + :depth: 3 + + + +L'abstract de l'article + +Le premier titre +================ + +Un paragraphe + +Un autre paragraphe + +Un sous titre +------------- + +Un para de la sous section + +Un autre sous titre +------------------- + +Un autre para + +Le *deuxime* titre +================== + +*avec* un para sur **plusieurs +ligne** histoire de *voir* + +et un autre ``para aussi **sur +plusieurs lignes** mais sans gras`` + +LISTES +------ + +- une petite liste +- qui contient +- plusieurs elements + et meme sur plusieur ligne + + voir meme avec plusieurs paragraphe + et des liens http://www.codelutin.com + + encore un petit + +- et la suite de la liste +- pour finir + +3. et meme + +4. des enum + +#. pour voir + +I) de tout + +II) sorte + +(a) pour tout + +(b) tester + +(#) vraiment tout + +FIELD +----- + +:un peu: de field + ca ne fait pas + de mal + + +:field1: avec un + petit texte + + - et meme un + - debut + - de list +:field2: todo + +DEFINITIONS +----------- + +un autre mot + une autre definition + +le mot : la classe + la definition + + avec un autre para + sur plusieurs lignes:: + + Et meme + avec *des* + ligne a + + preserver + tel quelles + sont + +le mot : la classe 1 : la classe 2 + la definition + + +SEPARATION +---------- + +avant + +----------------------------- + +apres + +Un tire +------- + +Un mini titre +~~~~~~~~~~~~~ + +Un autre encore plus mini qui ne sera pas afficher dans le sommaire +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Litteral +-------- + +:: + + public int unread(String [] lines, boolean addNewLine) { + int result = 0; + for (String line : lines) { + result += unread(line, addNewLine); + } + return result; + } + +un para 0 + + un para pluie + de 2 + +TABLE COMPLEXE +-------------- + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++------------------------+------------+----------+----------+ +| body row 2 | Cells may span columns. | ++------------------------+------------+---------------------+ +| body row 3 | Cells may | - Table cells | ++------------------------+ span rows. | - contain | +| body row 4 | | - body elements. | ++------------------------+------------+---------------------+ + ++------------------------+------------+---------------------+ +| body row 3 | Cells may | - Table cells | ++------------------------+ span rows. | - contain | +| body row 4 | | - body elements. | ++------------------------+------------+---------------------+ + +TABLE SIMPLE +------------ + +================ ============================================================ +Bullet list * items begin with "-", "+", or "*" +Enumerated list 1. items use any variation of "1.", "A)", and "(i)" + #. also auto-enumerated +Definition list Term is flush-left : optional classifier + Definition is indented, no blank line between +Field list :field name: field body +Option list -o at least 2 spaces between option & description +================ ============================================================ + + +===== ===== ====== + Inputs Output +------------ ------ + A B AorB +------------ ------ + A B A or B +===== ===== ====== +False False Second column of row 1. +True False Second column of row 2. +True 2 - Second column of row 3. + - Second item in bullet + list (row 3, column 2). +===== ===== ====== + +IMAGE +----- + +The |the big: biohazard| symbol must be used on containers used to dispose of medical waste. + +.. |the big: biohazard| image:: biohazard.png + +LIEN INLINE +----------- + +Une *petit* phare `pour avoir <http://www.free.fr>`_ un lien inline + +FIELD +----- + +:field1: def1 +:field2: def2 + +:field1: autre def1 +:field2: autre def2 + +ADMONITIONS +----------- + +.. admonition:: And, by the way... + + You can make up your own admonition too. + + :field1: autre def1 + :field2: autre def2 + +.. Attention:: All your base are belong to us. + You can make + +.. WARNING::The "raw" role is a stop-gap measure allowing the author to bypass:: + reStructuredText's markup. It is a "power-user" feature that + should not be overused or abused. The use of "raw" ties documents + to specific output formats and makes them less portable. + + If you often need to use "raw"-derived interpreted text roles or + the "raw" directive, that is a sign either of overuse/abuse or that + functionality may be missing from reStructuredText. Please + describe your situation in a message to the Docutils-users mailing + list. + + +.. admonition:: The "raw" role is a stop-gap measure allowing the author to bypass:: + reStructuredText's markup. It is a "power-user" feature that + should not be overused or abused. The use of "raw" ties documents + to specific output formats and makes them less portable. + + If you often need to use "raw"-derived interpreted text roles or + the "raw" directive, that is a sign either of overuse/abuse or that + functionality may be missing from reStructuredText. Please + describe your situation in a message to the Docutils-users mailing + list. + + + +.. Attention:: Derrière toi c'est horrible ! + + +.. admonition:: Ceci est un avertissement. + + Je vous demande de vous arrêtez. + +BLOCK QUOTE +----------- + +As a great paleontologist once said, + + This theory, that is mine, is mine. + + -- Anne Elk (Miss) + +DOCTEST BLOCK +------------- + +>>> print 'this is a Doctest block' +this is a Doctest block + +LINE BLOC +--------- + +| A one, two, a one two three four +| +| Half a bee, philosophically, +| must, *ipso facto*, half not be. +| But half the bee has got to be, +| *vis a vis* its entity. D'you see? +| +| But can a bee be said to be +| or not to be an entire bee, +| when half the bee is not a bee, +| due to some ancient injury? +| +| Singing... + +SIDEBAR +------- + +.. sidebar:: Title + :subtitle: If Desired + + Body. + +TOPIC +----- + +.. topic:: Title + + Body. + +.. header:: Ceci est une page de test + +.. footer:: Cree par **LETELLIER Sylvain** + +OPTION +------ + +-a command-line option "a" +-1 file, --one=file, --two file + Multiple options with arguments. + +FOOTNOTES +--------- + +[#]_ is a reference to footnote 1, and [#]_ is a reference to +footnote 2. + +.. [#] This is footnote 1. +.. [#] This is footnote 2. +.. [#] This is footnote 3. + +[#]_ is a reference to footnote 3. + +HYPERLINK +--------- + +it's an anonymous-hyperlink__ and this one is an simple hyperlink_ + +__ anonymous-hyperlink + +.. _hyperlink: www.google.fr + +COMMENT +------- + +.. + Ceci est un commentaire + +INLINE +------ + +``literal``, *emphasis*, **STRONG**, http://www.reference.com, letellier@codelutin.com + + +la derniere ligne. + + + + + Property changes on: trunk/jrst2/src/test/resources/textEntier.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/textHeader.rst (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/textHeader.rst) =================================================================== --- trunk/jrst2/src/test/resources/textHeader.rst (rev 0) +++ trunk/jrst2/src/test/resources/textHeader.rst 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,13 @@ +:authors: Benjamin POUSSIN <poussin@codelutin> ; Sylvain LETELLIER <letellier@codelutin> +:organization: Code Lutin +:address: 6 chemin des Orans + 44240 La Chapelle sur Erdre +:version: 2.1 +:status: a finir +:revision: 51 +:date: $date: 28/10/2006$ +:Un champs: au milieu + de null part + + avec meme un para +:copyright: � 2007. JRST - Code Lutin - GPL Property changes on: trunk/jrst2/src/test/resources/textHeader.rst ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native Copied: trunk/jrst2/src/test/resources/textLiteral.txt (from rev 184, trunk/jrst2/src/test/org/codelutin/jrst/textLiteral.txt) =================================================================== --- trunk/jrst2/src/test/resources/textLiteral.txt (rev 0) +++ trunk/jrst2/src/test/resources/textLiteral.txt 2008-08-27 12:57:01 UTC (rev 185) @@ -0,0 +1,21 @@ +private Element composeInclude(Element item) throws Exception { + String option = item.attributeValue("option"); + String path = item.getText(); + Element result = null; + if (option.equals("litteral")){ + result=DocumentHelper.createElement("LITERAL_BLOCK"); + FileReader reader = new FileReader(path); + BufferedReader bf = new BufferedReader(reader); + String line = bf.readLine(); + while (line!=null) + line += "\n"+bf.readLine(); + result.setText(line); + } + else{ + JRSTReader reader = new JRSTReader(); + FileReader in = new FileReader(path); + Document doc = reader.read(in); + result.appendContent(doc.getRootElement()); + } + return result; +} \ No newline at end of file Property changes on: trunk/jrst2/src/test/resources/textLiteral.txt ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:mergeinfo + Name: svn:eol-style + native