diff --git a/examples/unicode_jp/README.txt b/examples/unicode_jp/README.txt index 1950ffe0..5935fbe6 100644 --- a/examples/unicode_jp/README.txt +++ b/examples/unicode_jp/README.txt @@ -66,6 +66,13 @@ the bindings. Many thanks to Hiroaki Itoh for providing the schemas, example document, and romanization code. +If you are interested in other languages, consider replacing the +ConvertJPIdentifier() function in the modified pyxbgen script with one +that uses unidecode: https://pypi.python.org/pypi/Unidecode + +See this comment for further details: +https://sourceforge.net/p/pyxb/discussion/956708/thread/5246b205/#1c7f + Note: Because the package depends on OpenGIS, and OpenGIS bindings are no longer provided in the PyXB distribution, you should generate these bindings first. If they are missing, the test script will emit a warning and PyXB diff --git a/pyxb/utils/utility.py b/pyxb/utils/utility.py index 8385fc8f..549f8970 100644 --- a/pyxb/utils/utility.py +++ b/pyxb/utils/utility.py @@ -132,6 +132,10 @@ def _SetXMLIdentifierToPython (xml_identifier_to_python): perform that translation before the invalid characters are stripped. + For example, see `unidecode + `_ and `this forum posting + `_. + It is not the responsibility of this callable to do anything other than replace whatever characters it wishes to. All transformations performed by L{MakeIdentifier} will still be @@ -143,6 +147,7 @@ def _SetXMLIdentifierToPython (xml_identifier_to_python): default implementation, which is L{_DefaultXMLIdentifierToPython}. @rtype: C{unicode} + """ global _XMLIdentifierToPython if xml_identifier_to_python is None: