[Zope-Checkins] CVS: Zope/doc - CHANGES.txt:1.625.2.361

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/doc
In directory cvs.zope.org:/tmp/cvs-serv23163/doc

Modified Files:
  Tag: Zope-2_7-branch
CHANGES.txt 
Log Message:
typo


=== Zope/doc/CHANGES.txt 1.625.2.360 => 1.625.2.361 ===
--- Zope/doc/CHANGES.txt:1.625.2.360Sun Oct  9 19:53:56 2005
+++ Zope/doc/CHANGES.txtMon Oct 10 00:42:32 2005
@@ -13,12 +13,11 @@
 
 Bugs fixed
 
+  - disabled ".. include" directive for the ZReST product and the 
+
   - Collector #1490: Added a new zope.conf option to control the
 character set used to encode unicode data that reaches
 ZPublisher without any specified encoding.
-
-  - disabled ".. include" directive for all the ZReST product and the 
-reStructuredText package
 
   - Collector #1895: omit 'var' folder from recursive traversal causing 
 trouble with DirectoryStorage.

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py removed debug code

2005-10-09 Thread Andreas Jung
Log message for revision 39028:
  removed debug code
  

Changed:
  U   Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py

-=-
Modified: Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py
===
--- Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py   
2005-10-09 23:25:39 UTC (rev 39027)
+++ Zope/trunk/lib/python/docutils/parsers/rst/directives/misc.py   
2005-10-10 04:23:12 UTC (rev 39028)
@@ -24,10 +24,6 @@
 def include(name, arguments, options, content, lineno,
 content_offset, block_text, state, state_machine):
 """Include a reST file as part of the content of this reST file."""
-import pdb
-pdb.set_trace()
-
-print '1'
 if not state.document.settings.file_insertion_enabled:
 warning = state_machine.reporter.warning(
   '"%s" directive disabled.' % name,

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Packages/Zope/Startup - datatypes.py:1.6.2.9 zopeschema.xml:1.7.2.19

2005-10-09 Thread Jens Vagelpohl
Update of /cvs-repository/Packages/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv28362/lib/python/Zope/Startup

Modified Files:
  Tag: Zope-2_7-branch
datatypes.py zopeschema.xml 
Log Message:
- backporting Chris Withers' changes for Collector #1490: Added a new 
  zope.conf option to control the character set used to encode unicode 
  data that reaches ZPublisher without any specified encoding.


=== Packages/Zope/Startup/datatypes.py 1.6.2.8 => 1.6.2.9 ===
--- Packages/Zope/Startup/datatypes.py:1.6.2.8  Fri Apr 29 06:29:09 2005
+++ Packages/Zope/Startup/datatypes.py  Sun Oct  9 19:53:57 2005
@@ -223,3 +223,14 @@
 return (real_root, real_path, container_class)
 raise LookupError('Nothing known about mount path %s' % mount_path)
 
+def default_zpublisher_encoding(value):
+# This is a bit clunky but necessary :-(
+# These modules are imported during the configuration process
+# so a module-level call to getConfiguration in any of them
+# results in getting config data structure without the necessary
+# value in it.
+from ZPublisher import Converters, HTTPRequest, HTTPResponse
+Converters.default_encoding = value
+HTTPRequest.default_encoding = value
+HTTPResponse.default_encoding = value
+


=== Packages/Zope/Startup/zopeschema.xml 1.7.2.18 => 1.7.2.19 ===
--- Packages/Zope/Startup/zopeschema.xml:1.7.2.18   Wed Dec  1 18:01:48 2004
+++ Packages/Zope/Startup/zopeschema.xmlSun Oct  9 19:53:57 2005
@@ -773,5 +773,12 @@
 
   
 
+  
+ 
+   This key controls what character set is used to encode unicode
+   data that reaches ZPublisher without any other specified encoding.
+ 
+ iso-8859-15
+  
 
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Packages/ZPublisher - Converters.py:1.23.2.6 HTTPRequest.py:1.90.2.12 HTTPResponse.py:1.75.2.11

2005-10-09 Thread Jens Vagelpohl
Update of /cvs-repository/Packages/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv28362/lib/python/ZPublisher

Modified Files:
  Tag: Zope-2_7-branch
Converters.py HTTPRequest.py HTTPResponse.py 
Log Message:
- backporting Chris Withers' changes for Collector #1490: Added a new 
  zope.conf option to control the character set used to encode unicode 
  data that reaches ZPublisher without any specified encoding.


=== Packages/ZPublisher/Converters.py 1.23.2.5 => 1.23.2.6 ===
--- Packages/ZPublisher/Converters.py:1.23.2.5  Tue Nov 16 08:12:12 2004
+++ Packages/ZPublisher/Converters.py   Sun Oct  9 19:53:57 2005
@@ -17,10 +17,13 @@
 from DateTime import DateTime
 from cgi import escape
 
+# This may get overwritten during configuration
+default_encoding = 'iso-8859-15'
+
 def field2string(v):
 if hasattr(v,'read'): return v.read()
-elif isinstance(v,UnicodeType) :
-return v.encode('iso-8859-15')
+elif isinstance(v,UnicodeType):
+return v.encode(default_encoding)
 else:
 return str(v)
 


=== Packages/ZPublisher/HTTPRequest.py 1.90.2.11 => 1.90.2.12 ===
--- Packages/ZPublisher/HTTPRequest.py:1.90.2.11Thu Jul 21 12:18:41 2005
+++ Packages/ZPublisher/HTTPRequest.py  Sun Oct  9 19:53:57 2005
@@ -25,6 +25,9 @@
 from maybe_lock import allocate_lock
 xmlrpc=None # Placeholder for module that we'll import if we have to.
 
+# This may get overwritten during configuration
+default_encoding = 'iso-8859-15'
+
 isCGI_NAME = {
 'SERVER_SOFTWARE' : 1,
 'SERVER_NAME' : 1,
@@ -526,7 +529,7 @@
 if hasattr(converter,'convert_unicode'):
 item = converter.convert_unicode(item)
 else:
-item = 
converter(item.encode('iso-8859-15'))
+item = 
converter(item.encode(default_encoding))
 else:
 item=converter(item)
 


=== Packages/ZPublisher/HTTPResponse.py 1.75.2.10 => 1.75.2.11 ===
--- Packages/ZPublisher/HTTPResponse.py:1.75.2.10   Sat Sep 24 06:37:19 2005
+++ Packages/ZPublisher/HTTPResponse.py Sun Oct  9 19:53:57 2005
@@ -26,6 +26,8 @@
 
 nl2sp = maketrans('\n',' ')
 
+# This may get overwritten during configuration
+default_encoding = 'iso-8859-15' 
 
 # Enable APPEND_TRACEBACKS to make Zope append tracebacks like it used to,
 # but a better solution is to make standard_error_message display error_tb.
@@ -433,7 +435,7 @@
 encoding = match.group(1)
 return body.encode(encoding)
 # Use the default character encoding
-return body.encode('iso-8859-15','replace')
+return body.encode(default_encoding,'replace')
 
 def setBase(self,base):
 """Set the base URL for the returned document.

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/doc - CHANGES.txt:1.625.2.360

2005-10-09 Thread Jens Vagelpohl
Update of /cvs-repository/Zope/doc
In directory cvs.zope.org:/tmp/cvs-serv28362/doc

Modified Files:
  Tag: Zope-2_7-branch
CHANGES.txt 
Log Message:
- backporting Chris Withers' changes for Collector #1490: Added a new 
  zope.conf option to control the character set used to encode unicode 
  data that reaches ZPublisher without any specified encoding.


=== Zope/doc/CHANGES.txt 1.625.2.359 => 1.625.2.360 ===
--- Zope/doc/CHANGES.txt:1.625.2.359Sun Oct  9 11:16:34 2005
+++ Zope/doc/CHANGES.txtSun Oct  9 19:53:56 2005
@@ -13,6 +13,10 @@
 
 Bugs fixed
 
+  - Collector #1490: Added a new zope.conf option to control the
+character set used to encode unicode data that reaches
+ZPublisher without any specified encoding.
+
   - disabled ".. include" directive for all the ZReST product and the 
 reStructuredText package
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/skel/etc - zope.conf.in:1.6.2.28

2005-10-09 Thread Jens Vagelpohl
Update of /cvs-repository/Zope/skel/etc
In directory cvs.zope.org:/tmp/cvs-serv28362/skel/etc

Modified Files:
  Tag: Zope-2_7-branch
zope.conf.in 
Log Message:
- backporting Chris Withers' changes for Collector #1490: Added a new 
  zope.conf option to control the character set used to encode unicode 
  data that reaches ZPublisher without any specified encoding.


=== Zope/skel/etc/zope.conf.in 1.6.2.27 => 1.6.2.28 ===
--- Zope/skel/etc/zope.conf.in:1.6.2.27 Fri Apr  8 06:06:37 2005
+++ Zope/skel/etc/zope.conf.in  Sun Oct  9 19:53:57 2005
@@ -820,6 +820,18 @@
 #
 #large-file-threshold 1Mb
 
+# Directive: default_zpublisher_encoding
+#
+# Description:
+# This controls what character set is used to encode unicode
+# data that reaches ZPublisher without any other specified encoding.
+#
+# Default: iso-8859-15
+#
+# Example:
+#
+#default_zpublisher_encoding utf-8
+
 # Directives: servers
 #
 # Description:

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ Merge of fix for #1490 to 2.8 branch: new zope.conf option for controlling the encoding of data sent to ZPublisher without any specified encoding.

2005-10-09 Thread Chris Withers
Log message for revision 39027:
  Merge of fix for #1490 to 2.8 branch: new zope.conf option for controlling 
the encoding of data sent to ZPublisher without any specified encoding.

Changed:
  U   Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
  U   Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/Converters.py
  U   Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/HTTPRequest.py
  U   Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/HTTPResponse.py
  U   Zope/branches/Zope-2_8-branch/lib/python/Zope2/Startup/datatypes.py
  U   Zope/branches/Zope-2_8-branch/lib/python/Zope2/Startup/zopeschema.xml
  U   Zope/branches/Zope-2_8-branch/skel/etc/zope.conf.in

-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-10-09 21:10:33 UTC 
(rev 39026)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-10-09 23:25:39 UTC 
(rev 39027)
@@ -33,6 +33,10 @@
 
 Bugs Fixed
 
+  - Collector #1490: Added a new zope.conf option to control the
+character set used to encode unicode data that reaches
+ZPublisher without any specified encoding.
+
   - disabled ".. include" directive for all the ZReST product and the 
 reStructuredText package
 

Modified: Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/Converters.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/Converters.py   
2005-10-09 21:10:33 UTC (rev 39026)
+++ Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/Converters.py   
2005-10-09 23:25:39 UTC (rev 39027)
@@ -17,10 +17,13 @@
 from DateTime import DateTime
 from cgi import escape
 
+# This may get overwritten during configuration
+default_encoding = 'iso-8859-15'
+
 def field2string(v):
 if hasattr(v,'read'): return v.read()
-elif isinstance(v,UnicodeType) :
-return v.encode('iso-8859-15')
+elif isinstance(v,UnicodeType):
+return v.encode(default_encoding)
 else:
 return str(v)
 

Modified: Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/HTTPRequest.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/HTTPRequest.py  
2005-10-09 21:10:33 UTC (rev 39026)
+++ Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/HTTPRequest.py  
2005-10-09 23:25:39 UTC (rev 39027)
@@ -25,6 +25,9 @@
 from maybe_lock import allocate_lock
 xmlrpc=None # Placeholder for module that we'll import if we have to.
 
+# This may get overwritten during configuration
+default_encoding = 'iso-8859-15'
+
 isCGI_NAME = {
 'SERVER_SOFTWARE' : 1,
 'SERVER_NAME' : 1,
@@ -522,7 +525,7 @@
 if hasattr(converter,'convert_unicode'):
 item = converter.convert_unicode(item)
 else:
-item = 
converter(item.encode('iso-8859-15'))
+item = 
converter(item.encode(default_encoding))
 else:
 item=converter(item)
 

Modified: Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/HTTPResponse.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/HTTPResponse.py 
2005-10-09 21:10:33 UTC (rev 39026)
+++ Zope/branches/Zope-2_8-branch/lib/python/ZPublisher/HTTPResponse.py 
2005-10-09 23:25:39 UTC (rev 39027)
@@ -26,6 +26,8 @@
 
 nl2sp = maketrans('\n',' ')
 
+# This may get overwritten during configuration
+default_encoding = 'iso-8859-15'
 
 # Enable APPEND_TRACEBACKS to make Zope append tracebacks like it used to,
 # but a better solution is to make standard_error_message display error_tb.
@@ -444,7 +446,7 @@
 encoding = match.group(1)
 return body.encode(encoding)
 # Use the default character encoding
-return body.encode('iso-8859-15','replace')
+return body.encode(default_encoding,'replace')
 
 def setBase(self,base):
 """Set the base URL for the returned document.

Modified: Zope/branches/Zope-2_8-branch/lib/python/Zope2/Startup/datatypes.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/Zope2/Startup/datatypes.py 
2005-10-09 21:10:33 UTC (rev 39026)
+++ Zope/branches/Zope-2_8-branch/lib/python/Zope2/Startup/datatypes.py 
2005-10-09 23:25:39 UTC (rev 39027)
@@ -211,3 +211,13 @@
 return (real_root, real_path, container_class)
 raise LookupError('Nothing known about mount path %s' % mount_path)
 
+def default_zpublisher_encoding(value):
+# This is a bit clunky but necessary :-(
+# These modules are imported during the configuration process
+# so a module-level call to getConfiguration in any of them
+# res

[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt - disabled ".. include" directive for all the ZReST product and the

2005-10-09 Thread Andreas Jung
Log message for revision 39018:
  
- disabled ".. include" directive for all the ZReST product and the 
  reStructuredText package
  

Changed:
  U   Zope/branches/Zope-2_8-branch/doc/CHANGES.txt

-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-10-09 14:39:29 UTC 
(rev 39017)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt   2005-10-09 15:17:23 UTC 
(rev 39018)
@@ -33,6 +33,9 @@
 
 Bugs Fixed
 
+  - disabled ".. include" directive for all the ZReST product and the 
+reStructuredText package
+
   - Collector #1888: Adjust call to 'engine.translate' to accomodate
 change in its signature.
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/doc - CHANGES.txt:1.625.2.359

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/doc
In directory cvs.zope.org:/tmp/cvs-serv5894/doc

Modified Files:
  Tag: Zope-2_7-branch
CHANGES.txt 
Log Message:
  - disabled ".. include" directive for all the ZReST product and the 
reStructuredText package


=== Zope/doc/CHANGES.txt 1.625.2.358 => 1.625.2.359 ===
--- Zope/doc/CHANGES.txt:1.625.2.358Tue Oct  4 14:22:41 2005
+++ Zope/doc/CHANGES.txtSun Oct  9 11:16:34 2005
@@ -13,6 +13,9 @@
 
 Bugs fixed
 
+  - disabled ".. include" directive for all the ZReST product and the 
+reStructuredText package
+
   - Collector #1895: omit 'var' folder from recursive traversal causing 
 trouble with DirectoryStorage.
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/lib/python/docutils/languages - nl.py:1.1.2.1 ca.py:1.1.2.1

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/languages
In directory cvs.zope.org:/tmp/cvs-serv27461/languages

Added Files:
  Tag: Zope-2_7-branch
nl.py ca.py 
Log Message:
added


=== Added File Zope/lib/python/docutils/languages/nl.py ===
# Author: Martijn Pieters
# Contact: [EMAIL PROTECTED]
# Revision: $Revision: 1.1.2.1 $
# Date: $Date: 2005/10/09 14:45:39 $
# Copyright: This module has been placed in the public domain.

# New language mappings are welcome.  Before doing a new translation, please
# read .  Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.

"""
Dutch-language mappings for language-dependent features of Docutils.
"""

__docformat__ = 'reStructuredText'

labels = {
  # fixed: language-dependent
  'author': 'Auteur',
  'authors': 'Auteurs',
  'organization': 'Organisatie',
  'address': 'Adres',
  'contact': 'Contact',
  'version': 'Versie',
  'revision': 'Revisie',
  'status': 'Status',
  'date': 'Datum',
  'copyright': 'Copyright',
  'dedication': 'Toewijding',
  'abstract': 'Samenvatting',
  'attention': 'Attentie!',
  'caution': 'Let op!',
  'danger': '!GEVAAR!',
  'error': 'Fout',
  'hint': 'Hint',
  'important': 'Belangrijk',
  'note': 'Opmerking',
  'tip': 'Tip',
  'warning': 'Waarschuwing',
  'contents': 'Inhoud'}
"""Mapping of node class name to label text."""

bibliographic_fields = {
  # language-dependent: fixed
  'auteur': 'author',
  'auteurs': 'authors',
  'organisatie': 'organization',
  'adres': 'address',
  'contact': 'contact',
  'versie': 'version',
  'revisie': 'revision',
  'status': 'status',
  'datum': 'date',
  'copyright': 'copyright',
  'toewijding': 'dedication',
  'samenvatting': 'abstract'}
"""Dutch (lowcased) to canonical name mapping for bibliographic fields."""

author_separators = [';', ',']
"""List of separator strings for the 'Authors' bibliographic field. Tried in
order."""


=== Added File Zope/lib/python/docutils/languages/ca.py ===
# Author: Ivan Vilata i Balaguer
# Contact: [EMAIL PROTECTED]
# Revision: $Revision: 1.1.2.1 $
# Date: $Date: 2005/10/09 14:45:39 $
# Copyright: This module has been placed in the public domain.

# New language mappings are welcome.  Before doing a new translation, please
# read .  Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.

"""
Catalan-language mappings for language-dependent features of Docutils.
"""

__docformat__ = 'reStructuredText'

labels = {
  # fixed: language-dependent
  'author': u'Autor',
  'authors': u'Autors',
  'organization': u'Organitzaci\u00F3',
  'address': u'Adre\u00E7a',
  'contact': u'Contacte',
  'version': u'Versi\u00F3',
  'revision': u'Revisi\u00F3',
  'status': u'Estat',
  'date': u'Data',
  'copyright': u'Copyright',
  'dedication': u'Dedicat\u00F2ria',
  'abstract': u'Resum',
  'attention': u'Atenci\u00F3!',
  'caution': u'Compte!',
  'danger': u'PERILL!',
  'error': u'Error',
  'hint': u'Suggeriment',
  'important': u'Important',
  'note': u'Nota',
  'tip': u'Consell',
  'warning': u'Av\u00EDs',
  'contents': u'Contingut'}
"""Mapping of node class name to label text."""

bibliographic_fields = {
  # language-dependent: fixed
  u'autor': 'author',
  u'autors': 'authors',
  u'organitzaci\u00F3': 'organization',
  u'adre\u00E7a': 'address',
  u'contacte': 'contact',
  u'versi\u00F3': 'version',
  u'revisi\u00F3': 'revision',
  u'estat': 'status',
  u'data': 'date',
  u'copyright': 'copyright',
  u'dedicat\u00F2ria': 'dedication',
  u'resum': 'abstract'}
"""Catalan (lowcased) to canonical name mapping for bibliographic fields."""

author_separators = [';', ',']
"""List of separator strings for the 'Authors' bibliographic field. Tried in
order."""

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/lib/python/docutils/writers - null.py:1.1.2.1 newlatex2e.py:1.1.2.1

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/writers
In directory cvs.zope.org:/tmp/cvs-serv27461/writers

Added Files:
  Tag: Zope-2_7-branch
null.py newlatex2e.py 
Log Message:
added


=== Added File Zope/lib/python/docutils/writers/null.py ===
# Author: David Goodger
# Contact: [EMAIL PROTECTED]
# Revision: $Revision: 1.1.2.1 $
# Date: $Date: 2005/10/09 14:45:39 $
# Copyright: This module has been placed in the public domain.

"""
A do-nothing Writer.
"""

from docutils import writers


class Writer(writers.Writer):

supported = ('null',)
"""Formats this writer supports."""

config_section = 'null writer'
config_section_dependencies = ('writers',)

def translate(self):
pass


=== Added File Zope/lib/python/docutils/writers/newlatex2e.py ===
"""
:Author: Felix Wiemann
:Contact: [EMAIL PROTECTED]
:Revision: $Revision: 1.1.2.1 $
:Date: $Date: 2005/10/09 14:45:39 $
:Copyright: This module has been placed in the public domain.

LaTeX2e document tree Writer.
"""

# Thanks to Engelbert Gruber and various contributors for the original
# LaTeX writer, some code and many ideas of which have been used for
# this writer.

__docformat__ = 'reStructuredText'


from __future__ import nested_scopes

import re
import os.path
from types import ListType

import docutils
from docutils import nodes, writers, utils


class Writer(writers.Writer):

supported = ('newlatex', 'newlatex2e')
"""Formats this writer supports."""

settings_spec = (
'LaTeX-Specific Options',
'The LaTeX "--output-encoding" default is "latin-1:strict". '
'Note that this LaTeX writer is still EXPERIMENTAL.',
(('Specify a stylesheet file.  The path is used verbatim to include '
  'the file.  Overrides --stylesheet-path.',
  ['--stylesheet'],
  {'default': '', 'metavar': '',
   'overrides': 'stylesheet_path'}),
 ('Specify a stylesheet file, relative to the current working '
  'directory.  Overrides --stylesheet.',
  ['--stylesheet-path'],
  {'metavar': '', 'overrides': 'stylesheet'}),
 ('Specify a uesr stylesheet file.  See --stylesheet.',
  ['--user-stylesheet'],
  {'default': '', 'metavar': '',
   'overrides': 'user_stylesheet_path'}),
 ('Specify a user stylesheet file.  See --stylesheet-path.',
  ['--user-stylesheet-path'],
  {'metavar': '', 'overrides': 'user_stylesheet'})
 ),)

settings_defaults = {'output_encoding': 'latin-1',
 'trim_footnote_reference_space': 1,
 # Currently unsupported:
 'docinfo_xform': 0,
 # During development:
 'traceback': 1}

relative_path_settings = ('stylesheet_path',)

config_section = 'newlatex2e writer'
config_section_dependencies = ('writers',)

output = None
"""Final translated form of `document`."""

def __init__(self):
writers.Writer.__init__(self)
self.translator_class = LaTeXTranslator

def translate(self):
visitor = self.translator_class(self.document)
self.document.walkabout(visitor)
assert not visitor.context, 'context not empty: %s' % visitor.context
self.output = visitor.astext()
self.head = visitor.header
self.body = visitor.body


class Babel:
"""Language specifics for LaTeX."""
# country code by a.schlock.
# partly manually converted from iso and babel stuff, dialects and some
_ISO639_TO_BABEL = {
'no': 'norsk', # added by hand ( forget about nynorsk?)
'gd': 'scottish',  # added by hand
'hu': 'magyar',# added by hand
'pt': 'portuguese',# added by hand
'sl': 'slovenian',
'af': 'afrikaans',
'bg': 'bulgarian',
'br': 'breton',
'ca': 'catalan',
'cs': 'czech',
'cy': 'welsh',
'da': 'danish',
'fr': 'french',
# french, francais, canadien, acadian
'de': 'ngerman',  # rather than german
# ngerman, naustrian, german, germanb, austrian
'el': 'greek',
'en': 'english',
# english, USenglish, american, UKenglish, british, canadian
'eo': 'esperanto',
'es': 'spanish',
'et': 'estonian',
'eu': 'basque',
'fi': 'finnish',
'ga': 'irish',
'gl': 'galician',
'he': 'hebrew',
'hr': 'croatian',
'hu': 'hungarian',
'is': 'icelandic',
'it': 'italian',
'la': 'latin',
'nl': 'dutch',
'pl': 'polish',
'pt': 'portuguese',
'ro': 'romanian',
'ru': 'russian',
'sk': 'slovak',
'sr': 'serbian',
'sv': 'swedish',
'tr': 'turkish',
'uk': 'ukrainian'
}

def __init__(self, lang):
self.language = lang

def get_language(self):
if self._ISO639_TO_BABEL.ha

[Zope-Checkins] CVS: Zope/lib/python/docutils/parsers/rst/languages - nl.py:1.1.2.1 ca.py:1.1.2.1

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/parsers/rst/languages
In directory cvs.zope.org:/tmp/cvs-serv27461/parsers/rst/languages

Added Files:
  Tag: Zope-2_7-branch
nl.py ca.py 
Log Message:
added


=== Added File Zope/lib/python/docutils/parsers/rst/languages/nl.py ===
# Author: Martijn Pieters
# Contact: [EMAIL PROTECTED]
# Revision: $Revision: 1.1.2.1 $
# Date: $Date: 2005/10/09 14:45:39 $
# Copyright: This module has been placed in the public domain.

# New language mappings are welcome.  Before doing a new translation, please
# read .  Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.

"""
Dutch-language mappings for language-dependent features of
reStructuredText.
"""

__docformat__ = 'reStructuredText'


directives = {
  # language-dependent: fixed
  'attentie': 'attention',
  'let-op': 'caution',
  'gevaar': 'danger',
  'fout': 'error',
  'hint': 'hint',
  'belangrijk': 'important',
  'opmerking': 'note',
  'tip': 'tip',
  'waarschuwing': 'warning',
  'aanmaning': 'admonition',
  'katern': 'sidebar',
  'onderwerp': 'topic',
  'lijn-blok': 'line-block',
  'letterlijk-ontleed': 'parsed-literal',
  'rubriek': 'rubric',
  'opschrift': 'epigraph',
  'hoogtepunten': 'highlights',
  'pull-quote': 'pull-quote', # Dutch printers use the english term
  'samenstelling': 'compound',
  'verbinding': 'compound',
  #'vragen': 'questions',
  'tabel': 'table',
  'csv-tabel': 'csv-table',
  'lijst-tabel': 'list-table',
  #'veelgestelde-vragen': 'questions',
  'meta': 'meta',
  #'imagemap': 'imagemap',
  'beeld': 'image',
  'figuur': 'figure',
  'opnemen': 'include',
  'onbewerkt': 'raw',
  'vervang': 'replace',
  'vervanging': 'replace',
  'unicode': 'unicode',
  'klasse': 'class',
  'rol': 'role',
  'inhoud': 'contents',
  'sectnum': 'sectnum',
  'sectie-nummering': 'sectnum',
  'hoofdstuk-nummering': 'sectnum',
  u'header (translation required)': 'header',
  u'footer (translation required)': 'footer',
  #'voetnoten': 'footnotes',
  #'citaten': 'citations',
  'verwijzing-voetnoten': 'target-notes',
  'restructuredtext-test-instructie': 'restructuredtext-test-directive'}
"""Dutch name to registered (in directives/__init__.py) directive name
mapping."""

roles = {
# language-dependent: fixed
'afkorting': 'abbreviation',
# 'ab': 'abbreviation',
'acroniem': 'acronym',
'ac': 'acronym',
'index': 'index',
'i': 'index',
'inferieur': 'subscript',
'inf': 'subscript',
'superieur': 'superscript',
'sup': 'superscript',
'titel-referentie': 'title-reference',
'titel': 'title-reference',
't': 'title-reference',
'pep-referentie': 'pep-reference',
'pep': 'pep-reference',
'rfc-referentie': 'rfc-reference',
'rfc': 'rfc-reference',
'nadruk': 'emphasis',
'extra': 'strong',
'extra-nadruk': 'strong',
'vet': 'strong',
'letterlijk': 'literal',
'benoemde-referentie': 'named-reference',
'anonieme-referentie': 'anonymous-reference',
'voetnoot-referentie': 'footnote-reference',
'citaat-referentie': 'citation-reference',
'substitie-reference': 'substitution-reference',
'verwijzing': 'target',
'uri-referentie': 'uri-reference',
'uri': 'uri-reference',
'url': 'uri-reference',
'onbewerkt': 'raw',}
"""Mapping of Dutch role names to canonical role names for interpreted text.
"""


=== Added File Zope/lib/python/docutils/parsers/rst/languages/ca.py ===
# Author: Ivan Vilata i Balaguer
# Contact: [EMAIL PROTECTED]
# Revision: $Revision: 1.1.2.1 $
# Date: $Date: 2005/10/09 14:45:39 $
# Copyright: This module has been placed in the public domain.

# New language mappings are welcome.  Before doing a new translation, please
# read .  Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.

"""
Catalan-language mappings for language-dependent features of
reStructuredText.
"""

__docformat__ = 'reStructuredText'


directives = {
  # language-dependent: fixed
  u'atenci\u00F3': 'attention',
  u'compte': 'caution',
  u'perill': 'danger',
  u'error': 'error',
  u'suggeriment': 'hint',
  u'important': 'important',
  u'nota': 'note',
  u'consell': 'tip',
  u'av\u00EDs': 'warning',
  u'advertiment': 'admonition',
  u'nota-al-marge': 'sidebar',
  u'nota-marge': 'sidebar',
  u'tema': 'topic',
  u'bloc-de-l\u00EDnies': 'line-block',
  u'bloc-l\u00EDnies': 'line-block',
  u'literal-analitzat': 'parsed-literal',
  u'r\u00FAbrica': 'rubric',
  u'ep\u00EDgraf': 'epigraph',
  u'sumari': 'highlights',
  u'cita-destacada': 'p

[Zope-Checkins] CVS: Zope/lib/python/docutils/transforms - __init__.py:1.2.10.7 components.py:1.2.10.7 frontmatter.py:1.2.10.7 misc.py:1.2.10.7 parts.py:1.2.10.7 peps.py:1.2.10.8 references.py:1.2.10.7 universal.py:1.2.10.7

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/transforms
In directory cvs.zope.org:/tmp/cvs-serv26422/transforms

Modified Files:
  Tag: Zope-2_7-branch
__init__.py components.py frontmatter.py misc.py parts.py 
peps.py references.py universal.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/transforms/__init__.py 1.2.10.6 => 1.2.10.7 ===
--- Zope/lib/python/docutils/transforms/__init__.py:1.2.10.6Fri Jan  7 
08:26:05 2005
+++ Zope/lib/python/docutils/transforms/__init__.py Sun Oct  9 10:43:46 2005
@@ -59,7 +59,7 @@
 self.language = languages.get_language(
 document.settings.language_code)
 """Language module local to this document."""
-
+
 
 def apply(self):
 """Override to apply the transform to the document tree."""
@@ -163,7 +163,6 @@
 decorated_list = [(f.priority, f) for f in unknown_reference_resolvers]
 decorated_list.sort()
 self.unknown_reference_resolvers.extend([f[1] for f in decorated_list])
-
 
 def apply_transforms(self):
 """Apply all of the stored transforms, in priority order."""


=== Zope/lib/python/docutils/transforms/components.py 1.2.10.6 => 1.2.10.7 ===


=== Zope/lib/python/docutils/transforms/frontmatter.py 1.2.10.6 => 1.2.10.7 ===
--- Zope/lib/python/docutils/transforms/frontmatter.py:1.2.10.6 Fri Jan  7 
08:26:06 2005
+++ Zope/lib/python/docutils/transforms/frontmatter.py  Sun Oct  9 10:43:46 2005
@@ -5,13 +5,15 @@
 # Copyright: This module has been placed in the public domain.
 
 """
-Transforms related to the front matter of a document (information
-found before the main text):
+Transforms related to the front matter of a document or a section
+(information found before the main text):
 
 - `DocTitle`: Used to transform a lone top level section's title to
   the document title, and promote a remaining lone top-level section's
   title to the document subtitle.
 
+- `SectionTitle`: Used to transform a lone subsection into a subtitle.
+
 - `DocInfo`: Used to transform a bibliographic field list into docinfo
   elements.
 """
@@ -23,7 +25,100 @@
 from docutils.transforms import TransformError, Transform
 
 
-class DocTitle(Transform):
+class TitlePromoter(Transform):
+
+"""
+Abstract base class for DocTitle and SectionSubTitle transforms.
+"""
+
+def promote_title(self, node):
+"""
+Transform the following tree::
+
+
+
+
+...
+
+into ::
+
+
+
+...
+
+`node` is normally a document.
+"""
+# `node` must not have a title yet.
+assert not (len(node) and isinstance(node[0], nodes.title))
+section, index = self.candidate_index(node)
+if index is None:
+return None
+# Transfer the section's attributes to the node:
+node.attributes.update(section.attributes)
+# setup_child is called automatically for all nodes.
+node[:] = (section[:1]# section title
+   + node[:index] # everything that was in the
+  # node before the section
+   + section[1:]) # everything that was in the section
+assert isinstance(node[0], nodes.title)
+return 1
+
+def promote_subtitle(self, node):
+"""
+Transform the following node tree::
+
+
+
+
+
+...
+
+into ::
+
+
+
+
+...
+"""
+subsection, index = self.candidate_index(node)
+if index is None:
+return None
+subtitle = nodes.subtitle()
+# Transfer the subsection's attributes to the new subtitle:
+# This causes trouble with list attributes!  To do: Write a
+# test case which catches direct access to the `attributes`
+# dictionary and/or write a test case which shows problems in
+# this particular case.
+subtitle.attributes.update(subsection.attributes)
+# We're losing the subtitle's attributes here!  To do: Write a
+# test case which shows this behavior.
+# Transfer the contents of the subsection's title to the
+# subtitle:
+subtitle[:] = subsection[0][:]
+node[:] = (node[:1]   # title
+   + [subtitle]
+   # everything that was before the section:
+   + node[1:index]
+   # everything that was in the subsection:
+   + subsection[1:])
+return 1
+
+def candidate_index(self, node):
+"""
+Find and return the promotion candidate and its index.
+
+Return (None, None) if no valid candidate was found.
+"""
+index = node.first_child_not_matching_class(
+

[Zope-Checkins] CVS: Zope/lib/python/docutils/parsers/rst/languages - __init__.py:1.2.10.8 af.py:1.1.2.8 cs.py:1.1.4.5 de.py:1.2.10.8 en.py:1.2.10.8 eo.py:1.1.2.6 es.py:1.1.2.8 fi.py:1.1.2.2 fr.py:1.2.10.8 it.py:1.2.10.8 pt_br.py:1.1.4.5 ru.py:1.1.2.8 sk.py:1.2.10.8 sv.py:1.2.10.8 zh_tw.py:1.1.2.2

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/parsers/rst/languages
In directory cvs.zope.org:/tmp/cvs-serv26422/parsers/rst/languages

Modified Files:
  Tag: Zope-2_7-branch
__init__.py af.py cs.py de.py en.py eo.py es.py fi.py fr.py 
it.py pt_br.py ru.py sk.py sv.py zh_tw.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/parsers/rst/languages/__init__.py 1.2.10.7 => 
1.2.10.8 ===


=== Zope/lib/python/docutils/parsers/rst/languages/af.py 1.1.2.7 => 1.1.2.8 ===
--- Zope/lib/python/docutils/parsers/rst/languages/af.py:1.1.2.7Fri Jan 
 7 08:26:04 2005
+++ Zope/lib/python/docutils/parsers/rst/languages/af.pySun Oct  9 
10:43:45 2005
@@ -42,6 +42,7 @@
   #'faq': 'questions',
   'table (translation required)': 'table',
   'csv-table (translation required)': 'csv-table',
+  'list-table (translation required)': 'list-table',
   'meta': 'meta',
   #'beeldkaart': 'imagemap',
   'beeld': 'image',
@@ -55,6 +56,8 @@
   'inhoud': 'contents',
   'sectnum': 'sectnum',
   'section-numbering': 'sectnum',
+  u'header (translation required)': 'header',
+  u'footer (translation required)': 'footer',
   #'voetnote': 'footnotes',
   #'aanhalings': 'citations',
   'teikennotas': 'target-notes',


=== Zope/lib/python/docutils/parsers/rst/languages/cs.py 1.1.4.4 => 1.1.4.5 ===
--- Zope/lib/python/docutils/parsers/rst/languages/cs.py:1.1.4.4Fri Jan 
 7 08:26:04 2005
+++ Zope/lib/python/docutils/parsers/rst/languages/cs.pySun Oct  9 
10:43:45 2005
@@ -43,6 +43,7 @@
   #'faq': 'questions',
   u'table (translation required)': 'table',
   u'csv-table (translation required)': 'csv-table',
+  u'list-table (translation required)': 'list-table',
   u'meta (translation required)': 'meta',
   #'imagemap': 'imagemap',
   u'image (translation required)': 'image',   # obrazek
@@ -56,6 +57,8 @@
   u'obsah': 'contents',
   u'sectnum (translation required)': 'sectnum',
   u'section-numbering (translation required)': 'sectnum',
+  u'header (translation required)': 'header',
+  u'footer (translation required)': 'footer',
   #'footnotes': 'footnotes',
   #'citations': 'citations',
   u'target-notes (translation required)': 'target-notes',


=== Zope/lib/python/docutils/parsers/rst/languages/de.py 1.2.10.7 => 1.2.10.8 
===
--- Zope/lib/python/docutils/parsers/rst/languages/de.py:1.2.10.7   Fri Jan 
 7 08:26:04 2005
+++ Zope/lib/python/docutils/parsers/rst/languages/de.pySun Oct  9 
10:43:45 2005
@@ -42,6 +42,7 @@
   #'fragen': 'questions',
   'tabelle': 'table',
   'csv-tabelle': 'csv-table',
+  'list-table (translation required)': 'list-table',
   'meta': 'meta',
   #'imagemap': 'imagemap',
   'bild': 'image',
@@ -59,6 +60,8 @@
   'kapitel-nummerierung': 'sectnum',
   'abschnitts-nummerierung': 'sectnum',
   u'linkziel-fu\xdfnoten': 'target-notes',
+  u'header (translation required)': 'header',
+  u'footer (translation required)': 'footer',
   #u'fu\xdfnoten': 'footnotes',
   #'zitate': 'citations',
   }


=== Zope/lib/python/docutils/parsers/rst/languages/en.py 1.2.10.7 => 1.2.10.8 
===
--- Zope/lib/python/docutils/parsers/rst/languages/en.py:1.2.10.7   Fri Jan 
 7 08:26:04 2005
+++ Zope/lib/python/docutils/parsers/rst/languages/en.pySun Oct  9 
10:43:45 2005
@@ -41,6 +41,7 @@
   #'questions': 'questions',
   'table': 'table',
   'csv-table': 'csv-table',
+  'list-table': 'list-table',
   #'qa': 'questions',
   #'faq': 'questions',
   'meta': 'meta',
@@ -56,6 +57,8 @@
   'contents': 'contents',
   'sectnum': 'sectnum',
   'section-numbering': 'sectnum',
+  'header': 'header',
+  'footer': 'footer',
   #'footnotes': 'footnotes',
   #'citations': 'citations',
   'target-notes': 'target-notes',


=== Zope/lib/python/docutils/parsers/rst/languages/eo.py 1.1.2.5 => 1.1.2.6 ===
--- Zope/lib/python/docutils/parsers/rst/languages/eo.py:1.1.2.5Fri Jan 
 7 08:26:04 2005
+++ Zope/lib/python/docutils/parsers/rst/languages/eo.pySun Oct  9 
10:43:45 2005
@@ -48,6 +48,7 @@
   u'tabelo': 'table',
   u'tabelo-vdk': 'csv-table', # "valoroj disigitaj per komoj"
   u'tabelo-csv': 'csv-table',
+  u'tabelo-lista': 'list-table',
   u'meta': 'meta',
   #'imagemap': 'imagemap',
   u'bildo': 'image',
@@ -62,6 +63,8 @@
   u'enhavo': 'contents',
   u'seknum': 'sectnum',
   u'sekcia-numerado': 'sectnum',
+  u'kapsekcio': 'header',
+  u'piedsekcio': 'footer',
   #'footnotes': 'footnotes',
   #'citations': 'citations',
   u'celaj-notoj': 'target-notes',


=== Zope/lib/python/docutils/parsers/rst/languages/es.py 1.1.2.7 => 1.1.2.8 ===
--- Zope/lib/python/docutils/parsers/rst/languages/es.py:1.1.2.7Fri Jan 
 7 08:26:04 2005
+++ Zope/lib/python/docutils/parsers

[Zope-Checkins] CVS: Zope/lib/python/docutils/readers/python - __init__.py:1.3.2.6 moduleparser.py:1.3.2.6 pynodes.py:1.1.4.5

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/readers/python
In directory cvs.zope.org:/tmp/cvs-serv26422/readers/python

Modified Files:
  Tag: Zope-2_7-branch
__init__.py moduleparser.py pynodes.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/readers/python/__init__.py 1.3.2.5 => 1.3.2.6 ===
--- Zope/lib/python/docutils/readers/python/__init__.py:1.3.2.5 Fri Jan  7 
08:26:05 2005
+++ Zope/lib/python/docutils/readers/python/__init__.py Sun Oct  9 10:43:46 2005
@@ -88,7 +88,7 @@
 node['docformat'] = docformat
 parser = self.get_parser(docformat)
 parser.parse(text, self.document)
-for child in self.document.get_children():
+for child in self.document.children:
 node.append(child)
 self.document.current_source = self.document.current_line = None
 del self.document[:]


=== Zope/lib/python/docutils/readers/python/moduleparser.py 1.3.2.5 => 1.3.2.6 
===


=== Zope/lib/python/docutils/readers/python/pynodes.py 1.1.4.4 => 1.1.4.5 ===

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/lib/python/docutils/readers - __init__.py:1.2.10.7 pep.py:1.2.10.8 standalone.py:1.2.10.7

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/readers
In directory cvs.zope.org:/tmp/cvs-serv26422/readers

Modified Files:
  Tag: Zope-2_7-branch
__init__.py pep.py standalone.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/readers/__init__.py 1.2.10.6 => 1.2.10.7 ===


=== Zope/lib/python/docutils/readers/pep.py 1.2.10.7 => 1.2.10.8 ===
--- Zope/lib/python/docutils/readers/pep.py:1.2.10.7Fri Jan  7 08:26:05 2005
+++ Zope/lib/python/docutils/readers/pep.py Sun Oct  9 10:43:46 2005
@@ -31,9 +31,9 @@
 config_section_dependencies = ('readers', 'standalone reader')
 
 default_transforms = (references.Substitutions,
+  references.PropagateTargets,
   peps.Headers,
   peps.Contents,
-  references.ChainedTargets,
   references.AnonymousHyperlinks,
   references.IndirectHyperlinks,
   peps.TargetNotes,


=== Zope/lib/python/docutils/readers/standalone.py 1.2.10.6 => 1.2.10.7 ===
--- Zope/lib/python/docutils/readers/standalone.py:1.2.10.6 Fri Jan  7 
08:26:05 2005
+++ Zope/lib/python/docutils/readers/standalone.py  Sun Oct  9 10:43:46 2005
@@ -37,15 +37,26 @@
   'default).',
   ['--no-doc-info'],
   {'dest': 'docinfo_xform', 'action': 'store_false', 'default': 1,
-   'validator': frontend.validate_boolean}),))
+   'validator': frontend.validate_boolean}),
+ ('Activate the promotion of lone subsection titles to '
+  'section subtitles (disabled by default).',
+  ['--section-subtitles'],
+  {'dest': 'sectsubtitle_xform', 'action': 'store_true', 'default': 0,
+   'validator': frontend.validate_boolean}),
+ ('Deactivate the promotion of lone subsection titles.',
+  ['--no-section-subtitles'],
+  {'dest': 'sectsubtitle_xform', 'action': 'store_false',
+   'validator': frontend.validate_boolean}),
+ ))
 
 config_section = 'standalone reader'
 config_section_dependencies = ('readers',)
 
 default_transforms = (references.Substitutions,
+  references.PropagateTargets,
   frontmatter.DocTitle,
+  frontmatter.SectionSubTitle,
   frontmatter.DocInfo,
-  references.ChainedTargets,
   references.AnonymousHyperlinks,
   references.IndirectHyperlinks,
   references.Footnotes,

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/lib/python/docutils/parsers/rst/directives - __init__.py:1.2.10.9 admonitions.py:1.2.10.7 body.py:1.2.10.8 html.py:1.2.10.7 images.py:1.2.10.8 misc.py:1.2.10.8 parts.py:1.2.10.7 references.py:1.2.10.7 tables.py:1.1.2.4

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/parsers/rst/directives
In directory cvs.zope.org:/tmp/cvs-serv26422/parsers/rst/directives

Modified Files:
  Tag: Zope-2_7-branch
__init__.py admonitions.py body.py html.py images.py misc.py 
parts.py references.py tables.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/parsers/rst/directives/__init__.py 1.2.10.8 => 
1.2.10.9 ===
--- Zope/lib/python/docutils/parsers/rst/directives/__init__.py:1.2.10.8
Fri Jan  7 08:26:04 2005
+++ Zope/lib/python/docutils/parsers/rst/directives/__init__.py Sun Oct  9 
10:43:45 2005
@@ -113,10 +113,13 @@
   #'questions': ('body', 'question_list'),
   'table': ('tables', 'table'),
   'csv-table': ('tables', 'csv_table'),
+  'list-table': ('tables', 'list_table'),
   'image': ('images', 'image'),
   'figure': ('images', 'figure'),
   'contents': ('parts', 'contents'),
   'sectnum': ('parts', 'sectnum'),
+  'header': ('parts', 'header'),
+  'footer': ('parts', 'footer'),
   #'footnotes': ('parts', 'footnotes'),
   #'citations': ('parts', 'citations'),
   'target-notes': ('references', 'target_notes'),
@@ -250,17 +253,26 @@
 Return the path argument unwrapped (with newlines removed).
 (Directive option conversion function.)
 
-Raise ``ValueError`` if no argument is found or if the path contains
-internal whitespace.
+Raise ``ValueError`` if no argument is found.
 """
 if argument is None:
 raise ValueError('argument required but none supplied')
 else:
 path = ''.join([s.strip() for s in argument.splitlines()])
-if path.find(' ') == -1:
-return path
-else:
-raise ValueError('path contains whitespace')
+return path
+
+def uri(argument):
+"""
+Return the URI argument with whitespace removed.
+(Directive option conversion function.)
+
+Raise ``ValueError`` if no argument is found.
+"""
+if argument is None:
+raise ValueError('argument required but none supplied')
+else:
+uri = ''.join(argument.split())
+return uri
 
 def nonnegative_int(argument):
 """
@@ -274,7 +286,7 @@
 
 def class_option(argument):
 """
-Convert the argument into an ID-compatible string and return it.
+Convert the argument into a list of ID-compatible strings and return it.
 (Directive option conversion function.)
 
 Raise ``ValueError`` if no argument is found.
@@ -288,7 +300,7 @@
 if not class_name:
 raise ValueError('cannot make "%s" into a class name' % name)
 class_names.append(class_name)
-return ' '.join(class_names)
+return class_names
 
 unicode_pattern = re.compile(
 r'(?:0x|x|\\x|U\+?|\\u)([0-9a-f]+)$|&#x([0-9a-f]+);$', re.IGNORECASE)
@@ -296,10 +308,13 @@
 def unicode_code(code):
 r"""
 Convert a Unicode character code to a Unicode character.
+(Directive option conversion function.)
 
 Codes may be decimal numbers, hexadecimal numbers (prefixed by ``0x``,
 ``x``, ``\x``, ``U+``, ``u``, or ``\u``; e.g. ``U+262E``), or XML-style
 numeric character entities (e.g. ``☮``).  Other text remains as-is.
+
+Raise ValueError for illegal Unicode code values.
 """
 try:
 if code.isdigit():  # decimal number
@@ -315,6 +330,10 @@
 raise ValueError('code too large (%s)' % detail)
 
 def single_char_or_unicode(argument):
+"""
+A single character is returned as-is.  Unicode characters codes are
+converted as in `unicode_code`.  (Directive option conversion function.)
+"""
 char = unicode_code(argument)
 if len(char) > 1:
 raise ValueError('%r invalid; must be a single character or '
@@ -322,6 +341,10 @@
 return char
 
 def single_char_or_whitespace_or_unicode(argument):
+"""
+As with `single_char_or_unicode`, but "tab" and "space" are also supported.
+(Directive option conversion function.)
+"""
 if argument == 'tab':
 char = '\t'
 elif argument == 'space':
@@ -331,12 +354,23 @@
 return char
 
 def positive_int(argument):
+"""
+Converts the argument into an integer.  Raises ValueError for negative,
+zero, or non-integer values.  (Directive option conversion function.)
+"""
 value = int(argument)
 if value < 1:
 raise ValueError('negative or zero value; must be positive')
 return value
 
 def positive_int_list(argument):
+"""
+Converts a space- or comma-separated list of values into a Python list
+of integers.
+(Directive option conversion function.)
+
+Raises ValueError for non-positive-integer values.
+"""
 if ',' in argument:
 entries = argument.split(',')
 else:
@@ -344,6 +378,12 @@
 return [positive_int(entry) for entry in entries]
 
 def encoding(argument):
+"""
+Verfies the encoding argument by lookup.
+(Directive option c

[Zope-Checkins] CVS: Zope/lib/python/docutils/parsers/rst - __init__.py:1.2.10.8 roles.py:1.1.4.5 states.py:1.2.10.8 tableparser.py:1.2.10.7

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/parsers/rst
In directory cvs.zope.org:/tmp/cvs-serv26422/parsers/rst

Modified Files:
  Tag: Zope-2_7-branch
__init__.py roles.py states.py tableparser.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/parsers/rst/__init__.py 1.2.10.7 => 1.2.10.8 ===
--- Zope/lib/python/docutils/parsers/rst/__init__.py:1.2.10.7   Fri Jan  7 
08:26:03 2005
+++ Zope/lib/python/docutils/parsers/rst/__init__.pySun Oct  9 10:43:45 2005
@@ -112,7 +112,23 @@
  ('Leave spaces before footnote references.',
   ['--leave-footnote-reference-space'],
   {'action': 'store_false', 'dest': 'trim_footnote_reference_space',
-   'validator': frontend.validate_boolean}),))
+   'validator': frontend.validate_boolean}),
+ ('Disable directives that insert the contents of external file '
+  '("include" & "raw"); replaced with a "warning" system message.',
+  ['--no-file-insertion'],
+  {'action': 'store_false', 'default': 1,
+   'dest': 'file_insertion_enabled'}),
+ ('Enable directives that insert the contents of external file '
+  '("include" & "raw").  Enabled by default.',
+  ['--file-insertion-enabled'],
+  {'action': 'store_true', 'dest': 'file_insertion_enabled'}),
+ ('Disable the "raw" directives; replaced with a "warning" '
+  'system message.',
+  ['--no-raw'],
+  {'action': 'store_false', 'default': 1, 'dest': 'raw_enabled'}),
+ ('Enable the "raw" directive.  Enabled by default.',
+  ['--raw-enabled'],
+  {'action': 'store_true', 'dest': 'raw_enabled'}),))
 
 config_section = 'restructuredtext parser'
 config_section_dependencies = ('parsers',)
@@ -128,11 +144,10 @@
 def parse(self, inputstring, document):
 """Parse `inputstring` and populate `document`, a document tree."""
 self.setup_parse(inputstring, document)
-debug = document.reporter[''].debug
 self.statemachine = states.RSTStateMachine(
   state_classes=self.state_classes,
   initial_state=self.initial_state,
-  debug=debug)
+  debug=document.reporter.debug_flag)
 inputlines = docutils.statemachine.string2lines(
   inputstring, tab_width=document.settings.tab_width,
   convert_whitespace=1)


=== Zope/lib/python/docutils/parsers/rst/roles.py 1.1.4.4 => 1.1.4.5 ===
--- Zope/lib/python/docutils/parsers/rst/roles.py:1.1.4.4   Fri Jan  7 
08:26:03 2005
+++ Zope/lib/python/docutils/parsers/rst/roles.py   Sun Oct  9 10:43:45 2005
@@ -174,7 +174,7 @@
 if not hasattr(role_fn, 'options') or role_fn.options is None:
 role_fn.options = {'class': directives.class_option}
 elif not role_fn.options.has_key('class'):
-role_fn.options['class'] = directives.class_option
+role_fn.options['class'] = directives.class_option
 
 def register_generic_role(canonical_name, node_class):
 """For roles which simply wrap a given `node_class` around the text."""
@@ -195,6 +195,7 @@
 
 def __call__(self, role, rawtext, text, lineno, inliner,
  options={}, content=[]):
+set_classes(options)
 return [self.node_class(rawtext, utils.unescape(text), **options)], []
 
 
@@ -233,6 +234,7 @@
 ""
 # Once nested inline markup is implemented, this and other methods should
 # recursively call inliner.nested_parse().
+set_classes(options)
 return [nodes.inline(rawtext, utils.unescape(text), **options)], []
 
 generic_custom_role.options = {'class': directives.class_option}
@@ -265,6 +267,7 @@
 return [prb], [msg]
 # Base URL mainly used by inliner.pep_reference; so this is correct:
 ref = inliner.document.settings.pep_base_url + inliner.pep_url % pepnum
+set_classes(options)
 return [nodes.reference(rawtext, 'PEP ' + utils.unescape(text), refuri=ref,
 **options)], []
 
@@ -284,6 +287,7 @@
 return [prb], [msg]
 # Base URL mainly used by inliner.rfc_reference, so this is correct:
 ref = inliner.document.settings.rfc_base_url + inliner.rfc_url % rfcnum
+set_classes(options)
 node = nodes.reference(rawtext, 'RFC ' + utils.unescape(text), refuri=ref,
**options)
 return [node], []
@@ -299,10 +303,11 @@
 'an associated format.' % role, line=lineno)
 prb = inliner.problematic(rawtext, rawtext, msg)
 return [prb], [msg]
+set_classes(options)
 node = nodes.raw(rawtext, utils.unescape(text, 1), **options)
 return [node], []
 
-raw_role.options = {'format': directives.class_option}
+raw_role.options = {'format': directives.unchanged}
 
 register_canonical_role('raw', raw_role)
 
@@ -329,3 +334,14 @@
 # This should remain unimplemented, for testing purposes:
 register_canonical_role('restructuredtext-unimple

[Zope-Checkins] CVS: Zope/lib/python/docutils/languages - __init__.py:1.2.10.8 af.py:1.1.2.8 cs.py:1.1.4.5 de.py:1.2.10.8 en.py:1.2.10.8 eo.py:1.1.2.6 es.py:1.1.2.8 fi.py:1.1.2.2 fr.py:1.2.10.8 it.py:1.2.10.8 pt_br.py:1.1.4.5 ru.py:1.1.2.8 sk.py:1.2.10.8 sv.py:1.2.10.8 zh_tw.py:1.1.2.2

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/languages
In directory cvs.zope.org:/tmp/cvs-serv26422/languages

Modified Files:
  Tag: Zope-2_7-branch
__init__.py af.py cs.py de.py en.py eo.py es.py fi.py fr.py 
it.py pt_br.py ru.py sk.py sv.py zh_tw.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/languages/__init__.py 1.2.10.7 => 1.2.10.8 ===


=== Zope/lib/python/docutils/languages/af.py 1.1.2.7 => 1.1.2.8 ===


=== Zope/lib/python/docutils/languages/cs.py 1.1.4.4 => 1.1.4.5 ===


=== Zope/lib/python/docutils/languages/de.py 1.2.10.7 => 1.2.10.8 ===


=== Zope/lib/python/docutils/languages/en.py 1.2.10.7 => 1.2.10.8 ===


=== Zope/lib/python/docutils/languages/eo.py 1.1.2.5 => 1.1.2.6 ===


=== Zope/lib/python/docutils/languages/es.py 1.1.2.7 => 1.1.2.8 ===


=== Zope/lib/python/docutils/languages/fi.py 1.1.2.1 => 1.1.2.2 ===


=== Zope/lib/python/docutils/languages/fr.py 1.2.10.7 => 1.2.10.8 ===


=== Zope/lib/python/docutils/languages/it.py 1.2.10.7 => 1.2.10.8 ===
--- Zope/lib/python/docutils/languages/it.py:1.2.10.7   Fri Jan  7 08:26:02 2005
+++ Zope/lib/python/docutils/languages/it.pySun Oct  9 10:43:44 2005
@@ -45,7 +45,7 @@
   'autori': 'authors',
   'organizzazione': 'organization',
   'indirizzo': 'address',
-  'contatti': 'contact',
+  'contatto': 'contact',
   'versione': 'version',
   'revisione': 'revision',
   'status': 'status',


=== Zope/lib/python/docutils/languages/pt_br.py 1.1.4.4 => 1.1.4.5 ===


=== Zope/lib/python/docutils/languages/ru.py 1.1.2.7 => 1.1.2.8 ===
--- Zope/lib/python/docutils/languages/ru.py:1.1.2.7Fri Jan  7 08:26:02 2005
+++ Zope/lib/python/docutils/languages/ru.pySun Oct  9 10:43:44 2005
@@ -46,21 +46,21 @@
 """Mapping of node class name to label text."""
 
 bibliographic_fields = {
-  u'\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f': u'abstract',
-  u'\u0410\u0434\u0440\u0435\u0441': u'address',
-  u'\u0410\u0432\u0442\u043e\u0440': u'author',
-  u'\u0410\u0432\u0442\u043e\u0440\u044b': u'authors',
-  u'\u041a\u043e\u043d\u0442\u0430\u043a\u0442': u'contact',
-  u'\u041f\u0440\u0430\u0432\u0430 \u043a\u043e\u043f\u0438\u0440\u043e'
+  u'\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f': u'abstract',
+  u'\u0430\u0434\u0440\u0435\u0441': u'address',
+  u'\u0430\u0432\u0442\u043e\u0440': u'author',
+  u'\u0430\u0432\u0442\u043e\u0440\u044b': u'authors',
+  u'\u043a\u043e\u043d\u0442\u0430\u043a\u0442': u'contact',
+  u'\u043f\u0440\u0430\u0432\u0430 \u043a\u043e\u043f\u0438\u0440\u043e'
   u'\u0432\u0430\u043d\u0438\u044f': u'copyright',
-  u'\u0414\u0430\u0442\u0430': u'date',
-  u'\u041f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0438\u0435':
+  u'\u0434\u0430\u0442\u0430': u'date',
+  u'\u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0438\u0435':
   u'dedication',
-  u'\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f':
+  u'\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f':
   u'organization',
-  u'\u0420\u0435\u0434\u0430\u043a\u0446\u0438\u044f': u'revision',
-  u'\u0421\u0442\u0430\u0442\u0443\u0441': u'status',
-  u'\u0412\u0435\u0440\u0441\u0438\u044f': u'version'}
+  u'\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f': u'revision',
+  u'\u0441\u0442\u0430\u0442\u0443\u0441': u'status',
+  u'\u0432\u0435\u0440\u0441\u0438\u044f': u'version'}
 """Russian (lowcased) to canonical name mapping for bibliographic fields."""
 
 author_separators =  [';', ',']


=== Zope/lib/python/docutils/languages/sk.py 1.2.10.7 => 1.2.10.8 ===


=== Zope/lib/python/docutils/languages/sv.py 1.2.10.7 => 1.2.10.8 ===


=== Zope/lib/python/docutils/languages/zh_tw.py 1.1.2.1 => 1.1.2.2 ===

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/lib/python/docutils/parsers - __init__.py:1.2.10.7

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/parsers
In directory cvs.zope.org:/tmp/cvs-serv26422/parsers

Modified Files:
  Tag: Zope-2_7-branch
__init__.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/parsers/__init__.py 1.2.10.6 => 1.2.10.7 ===

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] CVS: Zope/lib/python/docutils - __init__.py:1.2.10.10 core.py:1.2.10.8 examples.py:1.1.4.4 frontend.py:1.2.10.9 io.py:1.2.10.8 nodes.py:1.2.10.8 statemachine.py:1.2.10.8 utils.py:1.2.10.8

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils
In directory cvs.zope.org:/tmp/cvs-serv26422

Modified Files:
  Tag: Zope-2_7-branch
__init__.py core.py examples.py frontend.py io.py nodes.py 
statemachine.py utils.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/__init__.py 1.2.10.9 => 1.2.10.10 ===
--- Zope/lib/python/docutils/__init__.py:1.2.10.9   Fri Jan  7 08:26:01 2005
+++ Zope/lib/python/docutils/__init__.pySun Oct  9 10:43:43 2005
@@ -51,7 +51,7 @@
 
 __docformat__ = 'reStructuredText'
 
-__version__ = '0.3.7'
+__version__ = '0.3.9'
 """``major.minor.micro`` version number.  The micro number is bumped for API
 changes, for new functionality, and for interim project releases.  The minor
 number is bumped whenever there is a significant project release.  The major


=== Zope/lib/python/docutils/core.py 1.2.10.7 => 1.2.10.8 ===
--- Zope/lib/python/docutils/core.py:1.2.10.7   Fri Jan  7 08:26:01 2005
+++ Zope/lib/python/docutils/core.pySun Oct  9 10:43:43 2005
@@ -197,6 +197,7 @@
 self.writer.assemble_parts()
 except Exception, error:
 if self.settings.traceback: # propagate exceptions?
+self.debugging_dumps(document)
 raise
 self.report_Exception(error)
 exit = 1
@@ -210,6 +211,8 @@
 return output
 
 def debugging_dumps(self, document):
+if not document:
+return
 if self.settings.dump_settings:
 print >>sys.stderr, '\n::: Runtime settings:'
 print >>sys.stderr, pprint.pformat(self.settings.__dict__)


=== Zope/lib/python/docutils/examples.py 1.1.4.3 => 1.1.4.4 ===
--- Zope/lib/python/docutils/examples.py:1.1.4.3Fri Jan  7 08:26:02 2005
+++ Zope/lib/python/docutils/examples.pySun Oct  9 10:43:43 2005
@@ -7,12 +7,13 @@
 """
 This module contains practical examples of Docutils client code.
 
-Importing this module is not recommended; its contents are subject to change
-in future Docutils releases.  Instead, it is recommended that you copy and
-paste the parts you need into your own code, modifying as necessary.
+Importing this module from client code is not recommended; its contents are
+subject to change in future Docutils releases.  Instead, it is recommended
+that you copy and paste the parts you need into your own code, modifying as
+necessary.
 """
 
-from docutils import core
+from docutils import core, io
 
 
 def html_parts(input_string, source_path=None, destination_path=None,
@@ -72,3 +73,23 @@
 if output_encoding != 'unicode':
 fragment = fragment.encode(output_encoding)
 return fragment
+
+def internals(input_string, source_path=None, destination_path=None,
+  input_encoding='unicode'):
+"""
+Return the document tree and publisher, for exploring Docutils internals.
+
+Parameters: see `html_parts()`.
+"""
+overrides = {'input_encoding': input_encoding}
+output, pub = core.publish_programmatically(
+source_class=io.StringInput, source=input_string,
+source_path=source_path,
+destination_class=io.NullOutput, destination=None,
+destination_path=destination_path,
+reader=None, reader_name='standalone',
+parser=None, parser_name='restructuredtext',
+writer=None, writer_name='null',
+settings=None, settings_spec=None, settings_overrides=overrides,
+config_section=None, enable_exit_status=None)
+return pub.writer.document, pub


=== Zope/lib/python/docutils/frontend.py 1.2.10.8 => 1.2.10.9 ===
--- Zope/lib/python/docutils/frontend.py:1.2.10.8   Fri Jan  7 08:26:02 2005
+++ Zope/lib/python/docutils/frontend.pySun Oct  9 10:43:43 2005
@@ -124,6 +124,13 @@
None, sys.exc_info()[2])
 return value
 
+def validate_nonnegative_int(setting, value, option_parser,
+ config_parser=None, config_section=None):
+value = int(value)
+if value < 0:
+raise ValueError('negative value; must be positive or zero')
+return value
+
 def validate_threshold(setting, value, option_parser,
config_parser=None, config_section=None):
 try:
@@ -333,10 +340,10 @@
'validator': validate_threshold}),
  ('Report all system messages, info-level and higher.  (Same as '
   '"--report=info".)',
-  ['--verbose', '-v'], {'action': 'store_const', 'const': 'info',
+  ['--verbose', '-v'], {'action': 'store_const', 'const': 1,
 'dest': 'report_level'}),
  ('Do not report any system messages.  (Same as "--report=none".)',
-  ['--quiet', '-q'], {'action': 'store_const', 'const': 'none',
+  ['--quiet', '-q'], {'action': 'store_const', 'const': 5,
   'dest': 'report_level'}),
  ('Set the threshold () at or above which 

[Zope-Checkins] CVS: Zope/lib/python/docutils/writers - __init__.py:1.2.10.8 docutils_xml.py:1.2.10.8 html4css1.py:1.2.10.8 latex2e.py:1.1.2.8 pep_html.py:1.2.10.7 pseudoxml.py:1.2.10.7

2005-10-09 Thread Andreas Jung
Update of /cvs-repository/Zope/lib/python/docutils/writers
In directory cvs.zope.org:/tmp/cvs-serv26422/writers

Modified Files:
  Tag: Zope-2_7-branch
__init__.py docutils_xml.py html4css1.py latex2e.py 
pep_html.py pseudoxml.py 
Log Message:
upgrade to docutils 0.3.9


=== Zope/lib/python/docutils/writers/__init__.py 1.2.10.7 => 1.2.10.8 ===


=== Zope/lib/python/docutils/writers/docutils_xml.py 1.2.10.7 => 1.2.10.8 ===


=== Zope/lib/python/docutils/writers/html4css1.py 1.2.10.7 => 1.2.10.8 ===
--- Zope/lib/python/docutils/writers/html4css1.py:1.2.10.7  Fri Jan  7 
08:26:06 2005
+++ Zope/lib/python/docutils/writers/html4css1.py   Sun Oct  9 10:43:46 2005
@@ -63,6 +63,20 @@
   ['--initial-header-level'],
   {'choices': '1 2 3 4 5 6'.split(), 'default': '1',
'metavar': ''}),
+ ('Specify the maximum width (in characters) for one-column field '
+  'names.  Longer field names will span an entire row of the table '
+  'used to render the field list.  Default is 14 characters.  '
+  'Use 0 for "no limit".',
+  ['--field-name-limit'],
+  {'default': 14, 'metavar': '',
+   'validator': frontend.validate_nonnegative_int}),
+ ('Specify the maximum width (in characters) for options in option '
+  'lists.  Longer options will span an entire row of the table used '
+  'to render the option list.  Default is 14 characters.  '
+  'Use 0 for "no limit".',
+  ['--option-limit'],
+  {'default': 14, 'metavar': '',
+   'validator': frontend.validate_nonnegative_int}),
  ('Format for footnote references: one of "superscript" or '
   '"brackets".  Default is "brackets".',
   ['--footnote-references'],
@@ -87,7 +101,12 @@
  ('Omit the XML declaration.  Use with caution.',
   ['--no-xml-declaration'],
   {'dest': 'xml_declaration', 'default': 1, 'action': 'store_false',
-   'validator': frontend.validate_boolean}),))
+   'validator': frontend.validate_boolean}),
+ ('Scramble email addresses to confuse harvesters.  '
+  'For example, "[EMAIL PROTECTED]" will become '
+  '``mailto:%61%62%63%40...";>abc at example dot org``.',
+  ['--cloak-email-addresses'],
+  {'action': 'store_true', 'validator': frontend.validate_boolean}),))
 
 relative_path_settings = ('stylesheet_path',)
 
@@ -99,10 +118,9 @@
 self.translator_class = HTMLTranslator
 
 def translate(self):
-visitor = self.translator_class(self.document)
+self.visitor = visitor = self.translator_class(self.document)
 self.document.walkabout(visitor)
 self.output = visitor.astext()
-self.visitor = visitor
 for attr in ('head_prefix', 'stylesheet', 'head', 'body_prefix',
  'body_pre_docinfo', 'docinfo', 'body', 'fragment',
  'body_suffix'):
@@ -111,7 +129,9 @@
 def assemble_parts(self):
 writers.Writer.assemble_parts(self)
 for part in ('title', 'subtitle', 'docinfo', 'body', 'header',
- 'footer', 'meta', 'stylesheet', 'fragment'):
+ 'footer', 'meta', 'stylesheet', 'fragment',
+ 'html_prolog', 'html_head', 'html_title', 'html_subtitle',
+ 'html_body'):
 self.parts[part] = ''.join(getattr(self.visitor, part))
 
 
@@ -163,16 +183,15 @@
' PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'
' "http://www.w3.org/TR/xhtml1/DTD/'
'xhtml1-transitional.dtd">\n')
-html_head = ('http://www.w3.org/1999/xhtml"; xml:lang="%s" '
- 'lang="%s">\n\n')
-content_type = ('\n')
+head_prefix_template = ('http://www.w3.org/1999/xhtml";'
+' xml:lang="%s" lang="%s">\n\n')
+content_type = ('\n')
 generator = ('http://docutils.sourceforge.net/"; />\n')
 stylesheet_link = '\n'
 embedded_stylesheet = '\n\n%s\n\n'
-named_tags = {'a': 1, 'applet': 1, 'form': 1, 'frame': 1, 'iframe': 1,
-  'img': 1, 'map': 1}
+named_tags = ['a', 'applet', 'form', 'frame', 'iframe', 'img', 'map']
 words_and_spaces = re.compile(r'\S+| +|\n')
 
 def __init__(self, document):
@@ -182,14 +201,17 @@
 self.language = languages.get_language(lcode)
 self.meta = [self.content_type % settings.output_encoding,
  self.generator % docutils.__version__]
-self.head_prefix = [
-  self.doctype,
-  self.html_head % (lcode, lcode)]
-self.head_prefix.extend(self.meta)
+self.head_prefix = []
+self.html_prolog = []
 if settings.xml_declaration:
-self.head_prefix.insert(0, self.xml_declaration
+self.head_prefix.append(self.xml_declaration
 % settings.output_encoding)
- 

[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/ disabled the reST .. include directive

2005-10-09 Thread Andreas Jung
Log message for revision 39017:
  disabled the reST .. include directive 
  

Changed:
  U   Zope/branches/Zope-2_8-branch/lib/python/Products/ZReST/ZReST.py
  U   Zope/branches/Zope-2_8-branch/lib/python/reStructuredText/__init__.py

-=-
Modified: Zope/branches/Zope-2_8-branch/lib/python/Products/ZReST/ZReST.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/Products/ZReST/ZReST.py
2005-10-09 14:37:54 UTC (rev 39016)
+++ Zope/branches/Zope-2_8-branch/lib/python/Products/ZReST/ZReST.py
2005-10-09 14:39:29 UTC (rev 39017)
@@ -192,6 +192,9 @@
 # set the reporting level to something sane
 pub.settings.report_level = int(self.report_level)
 
+# disallow use of the .. include directive for security reasons
+pub.settings.file_insertion_enabled = 0
+
 # don't break if we get errors
 pub.settings.halt_level = 6
 

Modified: Zope/branches/Zope-2_8-branch/lib/python/reStructuredText/__init__.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/reStructuredText/__init__.py   
2005-10-09 14:37:54 UTC (rev 39016)
+++ Zope/branches/Zope-2_8-branch/lib/python/reStructuredText/__init__.py   
2005-10-09 14:39:29 UTC (rev 39017)
@@ -74,6 +74,7 @@
 if language_code:
 settings['language_code'] = language_code
 settings['language_code'] = language_code
+settings['file_insertion_enabled '] = 0
 # starting level for  elements:
 settings['initial_header_level'] = initial_header_level + 1
 # set the reporting level to something sane:

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/docutils/ update to docutils 0.3.9

2005-10-09 Thread Andreas Jung
Log message for revision 39016:
  update to docutils 0.3.9
  

Changed:
  A   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/ca.py
  A   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/nl.py
  A   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/ca.py
  A   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/nl.py
  A   Zope/branches/Zope-2_8-branch/lib/python/docutils/writers/newlatex2e.py
  A   Zope/branches/Zope-2_8-branch/lib/python/docutils/writers/null.py

-=-
Added: Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/ca.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/ca.py   
2005-10-09 14:37:14 UTC (rev 39015)
+++ Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/ca.py   
2005-10-09 14:37:54 UTC (rev 39016)
@@ -0,0 +1,62 @@
+# Author: Ivan Vilata i Balaguer
+# Contact: [EMAIL PROTECTED]
+# Revision: $Revision: 3276 $
+# Date: $Date: 2005-04-30 13:34:52 +0200 (Sat, 30 Apr 2005) $
+# Copyright: This module has been placed in the public domain.
+
+# New language mappings are welcome.  Before doing a new translation, please
+# read .  Two files must be
+# translated for each language: one in docutils/languages, the other in
+# docutils/parsers/rst/languages.
+
+"""
+Catalan-language mappings for language-dependent features of Docutils.
+"""
+
+__docformat__ = 'reStructuredText'
+
+labels = {
+  # fixed: language-dependent
+  'author': u'Autor',
+  'authors': u'Autors',
+  'organization': u'Organitzaci\u00F3',
+  'address': u'Adre\u00E7a',
+  'contact': u'Contacte',
+  'version': u'Versi\u00F3',
+  'revision': u'Revisi\u00F3',
+  'status': u'Estat',
+  'date': u'Data',
+  'copyright': u'Copyright',
+  'dedication': u'Dedicat\u00F2ria',
+  'abstract': u'Resum',
+  'attention': u'Atenci\u00F3!',
+  'caution': u'Compte!',
+  'danger': u'PERILL!',
+  'error': u'Error',
+  'hint': u'Suggeriment',
+  'important': u'Important',
+  'note': u'Nota',
+  'tip': u'Consell',
+  'warning': u'Av\u00EDs',
+  'contents': u'Contingut'}
+"""Mapping of node class name to label text."""
+
+bibliographic_fields = {
+  # language-dependent: fixed
+  u'autor': 'author',
+  u'autors': 'authors',
+  u'organitzaci\u00F3': 'organization',
+  u'adre\u00E7a': 'address',
+  u'contacte': 'contact',
+  u'versi\u00F3': 'version',
+  u'revisi\u00F3': 'revision',
+  u'estat': 'status',
+  u'data': 'date',
+  u'copyright': 'copyright',
+  u'dedicat\u00F2ria': 'dedication',
+  u'resum': 'abstract'}
+"""Catalan (lowcased) to canonical name mapping for bibliographic fields."""
+
+author_separators = [';', ',']
+"""List of separator strings for the 'Authors' bibliographic field. Tried in
+order."""

Added: Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/nl.py
===
--- Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/nl.py   
2005-10-09 14:37:14 UTC (rev 39015)
+++ Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/nl.py   
2005-10-09 14:37:54 UTC (rev 39016)
@@ -0,0 +1,62 @@
+# Author: Martijn Pieters
+# Contact: [EMAIL PROTECTED]
+# Revision: $Revision: 3058 $
+# Date: $Date: 2005-03-18 21:09:22 +0100 (Fri, 18 Mar 2005) $
+# Copyright: This module has been placed in the public domain.
+
+# New language mappings are welcome.  Before doing a new translation, please
+# read .  Two files must be
+# translated for each language: one in docutils/languages, the other in
+# docutils/parsers/rst/languages.
+
+"""
+Dutch-language mappings for language-dependent features of Docutils.
+"""
+
+__docformat__ = 'reStructuredText'
+
+labels = {
+  # fixed: language-dependent
+  'author': 'Auteur',
+  'authors': 'Auteurs',
+  'organization': 'Organisatie',
+  'address': 'Adres',
+  'contact': 'Contact',
+  'version': 'Versie',
+  'revision': 'Revisie',
+  'status': 'Status',
+  'date': 'Datum',
+  'copyright': 'Copyright',
+  'dedication': 'Toewijding',
+  'abstract': 'Samenvatting',
+  'attention': 'Attentie!',
+  'caution': 'Let op!',
+  'danger': '!GEVAAR!',
+  'error': 'Fout',
+  'hint': 'Hint',
+  'important': 'Belangrijk',
+  'note': 'Opmerking',
+  'tip': 'Tip',
+  'warning': 'Waarschuwing',
+  'contents': 'Inhoud'}
+"""Mapping of node class name to label text."""
+
+bibliographic_fields = {
+  # language-dependent: fixed
+  'auteur': 'author',
+  'auteurs': 'authors',
+  'organisatie': 'organization',
+  'adres': 'address',
+  'contact': 'contact',
+  'versie': 'version',
+  'revisie': 'revision',
+  'status': 'status',
+  'dat

[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/docutils/ update to docutils 0.3.9

2005-10-09 Thread Andreas Jung
Log message for revision 39015:
  update to docutils 0.3.9
  

Changed:
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/__init__.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/core.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/examples.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/frontend.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/io.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/__init__.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/af.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/cs.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/de.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/en.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/eo.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/es.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/fi.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/fr.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/it.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/pt_br.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/ru.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/sk.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/sv.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/languages/zh_tw.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/nodes.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/__init__.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/__init__.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/directives/__init__.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/directives/admonitions.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/directives/body.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/directives/html.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/directives/images.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/directives/misc.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/directives/parts.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/directives/references.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/directives/tables.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/__init__.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/af.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/cs.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/de.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/en.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/eo.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/es.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/fi.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/fr.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/it.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/pt_br.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/ru.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/sk.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/sv.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/languages/zh_tw.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/roles.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/states.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/parsers/rst/tableparser.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/readers/__init__.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/readers/pep.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/readers/python/__init__.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/readers/python/moduleparser.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/readers/python/pynodes.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/readers/standalone.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/statemachine.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/transforms/__init__.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/transforms/components.py
  U   
Zope/branches/Zope-2_8-branch/lib/python/docutils/transforms/frontmatter.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/transforms/misc.py
  U   Zope/branches/Zope-2_8-branch/lib/python/docutils/transforms/parts.p

[Zope-Checkins] SVN: Zope/trunk/lib/python/docutils/ update to docutils 0.3.9

2005-10-09 Thread Andreas Jung
Log message for revision 39014:
  update to docutils 0.3.9
  

Changed:
  A   Zope/trunk/lib/python/docutils/languages/ca.py
  A   Zope/trunk/lib/python/docutils/languages/nl.py
  A   Zope/trunk/lib/python/docutils/parsers/rst/languages/ca.py
  A   Zope/trunk/lib/python/docutils/parsers/rst/languages/nl.py
  A   Zope/trunk/lib/python/docutils/writers/newlatex2e.py
  A   Zope/trunk/lib/python/docutils/writers/null.py

-=-
Added: Zope/trunk/lib/python/docutils/languages/ca.py
===
--- Zope/trunk/lib/python/docutils/languages/ca.py  2005-10-09 14:31:37 UTC 
(rev 39013)
+++ Zope/trunk/lib/python/docutils/languages/ca.py  2005-10-09 14:32:51 UTC 
(rev 39014)
@@ -0,0 +1,62 @@
+# Author: Ivan Vilata i Balaguer
+# Contact: [EMAIL PROTECTED]
+# Revision: $Revision: 3276 $
+# Date: $Date: 2005-04-30 13:34:52 +0200 (Sat, 30 Apr 2005) $
+# Copyright: This module has been placed in the public domain.
+
+# New language mappings are welcome.  Before doing a new translation, please
+# read .  Two files must be
+# translated for each language: one in docutils/languages, the other in
+# docutils/parsers/rst/languages.
+
+"""
+Catalan-language mappings for language-dependent features of Docutils.
+"""
+
+__docformat__ = 'reStructuredText'
+
+labels = {
+  # fixed: language-dependent
+  'author': u'Autor',
+  'authors': u'Autors',
+  'organization': u'Organitzaci\u00F3',
+  'address': u'Adre\u00E7a',
+  'contact': u'Contacte',
+  'version': u'Versi\u00F3',
+  'revision': u'Revisi\u00F3',
+  'status': u'Estat',
+  'date': u'Data',
+  'copyright': u'Copyright',
+  'dedication': u'Dedicat\u00F2ria',
+  'abstract': u'Resum',
+  'attention': u'Atenci\u00F3!',
+  'caution': u'Compte!',
+  'danger': u'PERILL!',
+  'error': u'Error',
+  'hint': u'Suggeriment',
+  'important': u'Important',
+  'note': u'Nota',
+  'tip': u'Consell',
+  'warning': u'Av\u00EDs',
+  'contents': u'Contingut'}
+"""Mapping of node class name to label text."""
+
+bibliographic_fields = {
+  # language-dependent: fixed
+  u'autor': 'author',
+  u'autors': 'authors',
+  u'organitzaci\u00F3': 'organization',
+  u'adre\u00E7a': 'address',
+  u'contacte': 'contact',
+  u'versi\u00F3': 'version',
+  u'revisi\u00F3': 'revision',
+  u'estat': 'status',
+  u'data': 'date',
+  u'copyright': 'copyright',
+  u'dedicat\u00F2ria': 'dedication',
+  u'resum': 'abstract'}
+"""Catalan (lowcased) to canonical name mapping for bibliographic fields."""
+
+author_separators = [';', ',']
+"""List of separator strings for the 'Authors' bibliographic field. Tried in
+order."""

Added: Zope/trunk/lib/python/docutils/languages/nl.py
===
--- Zope/trunk/lib/python/docutils/languages/nl.py  2005-10-09 14:31:37 UTC 
(rev 39013)
+++ Zope/trunk/lib/python/docutils/languages/nl.py  2005-10-09 14:32:51 UTC 
(rev 39014)
@@ -0,0 +1,62 @@
+# Author: Martijn Pieters
+# Contact: [EMAIL PROTECTED]
+# Revision: $Revision: 3058 $
+# Date: $Date: 2005-03-18 21:09:22 +0100 (Fri, 18 Mar 2005) $
+# Copyright: This module has been placed in the public domain.
+
+# New language mappings are welcome.  Before doing a new translation, please
+# read .  Two files must be
+# translated for each language: one in docutils/languages, the other in
+# docutils/parsers/rst/languages.
+
+"""
+Dutch-language mappings for language-dependent features of Docutils.
+"""
+
+__docformat__ = 'reStructuredText'
+
+labels = {
+  # fixed: language-dependent
+  'author': 'Auteur',
+  'authors': 'Auteurs',
+  'organization': 'Organisatie',
+  'address': 'Adres',
+  'contact': 'Contact',
+  'version': 'Versie',
+  'revision': 'Revisie',
+  'status': 'Status',
+  'date': 'Datum',
+  'copyright': 'Copyright',
+  'dedication': 'Toewijding',
+  'abstract': 'Samenvatting',
+  'attention': 'Attentie!',
+  'caution': 'Let op!',
+  'danger': '!GEVAAR!',
+  'error': 'Fout',
+  'hint': 'Hint',
+  'important': 'Belangrijk',
+  'note': 'Opmerking',
+  'tip': 'Tip',
+  'warning': 'Waarschuwing',
+  'contents': 'Inhoud'}
+"""Mapping of node class name to label text."""
+
+bibliographic_fields = {
+  # language-dependent: fixed
+  'auteur': 'author',
+  'auteurs': 'authors',
+  'organisatie': 'organization',
+  'adres': 'address',
+  'contact': 'contact',
+  'versie': 'version',
+  'revisie': 'revision',
+  'status': 'status',
+  'datum': 'date',
+  'copyright': 'copyright',
+  'toewijding': 'dedication',
+  'samenvatting': 'abstract'}
+"""Dutch (lowcased) to canonical name mapping for bibliographic fields."""
+
+author_separators = [';

[Zope-Checkins] SVN: Zope/trunk/lib/python/reStructuredText/__init__.py disallowing .. include directive

2005-10-09 Thread Andreas Jung
Log message for revision 39012:
  disallowing .. include directive
  

Changed:
  U   Zope/trunk/lib/python/reStructuredText/__init__.py

-=-
Modified: Zope/trunk/lib/python/reStructuredText/__init__.py
===
--- Zope/trunk/lib/python/reStructuredText/__init__.py  2005-10-09 14:30:31 UTC 
(rev 39011)
+++ Zope/trunk/lib/python/reStructuredText/__init__.py  2005-10-09 14:31:06 UTC 
(rev 39012)
@@ -71,6 +71,7 @@
 settings['input_encoding'] = input_encoding
 settings['output_encoding'] = output_encoding
 settings['stylesheet'] = stylesheet
+settings['file_insertion_enabled'] = 0
 if language_code:
 settings['language_code'] = language_code
 settings['language_code'] = language_code

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/ZReST/ZReST.py disallowing .. include directive

2005-10-09 Thread Andreas Jung
Log message for revision 39011:
  disallowing .. include directive
  

Changed:
  U   Zope/trunk/lib/python/Products/ZReST/ZReST.py

-=-
Modified: Zope/trunk/lib/python/Products/ZReST/ZReST.py
===
--- Zope/trunk/lib/python/Products/ZReST/ZReST.py   2005-10-09 14:16:25 UTC 
(rev 39010)
+++ Zope/trunk/lib/python/Products/ZReST/ZReST.py   2005-10-09 14:30:31 UTC 
(rev 39011)
@@ -192,6 +192,9 @@
 # set the reporting level to something sane
 pub.settings.report_level = int(self.report_level)
 
+# Disallow inclusion of files for security reasons
+pub.settings.file_insertion_enabled = 0
+
 # don't break if we get errors
 pub.settings.halt_level = 6
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins