[ python-Bugs-1143855 ] Python syntax is not so XML friendly!

SourceForge.net noreply at sourceforge.net
Fri Feb 18 16:52:06 CET 2005


Bugs item #1143855, was opened at 2005-02-18 16:31
Message generated for change (Comment added) made by sjoerd
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1143855&group_id=5470

Category: Parser/Compiler
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Colbert Philippe (cp1965)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python syntax is not so XML friendly!

Initial Comment:
I want to embed python scripts into XML files.  The 
problems is depending on the XML readers's 
configuration, the space or tab characters might or 
might not be eliminated.  This is a a serious risk.  That is 
why I propose that Python/Jython allow for traditional 
Java style separators block ({ }).  This would be 
optional and would improve the flexibility of Python.  The 
programmer can always choose which style he/she 
wants to use.

----------------------------------------------------------------------

>Comment By: Sjoerd Mullender (sjoerd)
Date: 2005-02-18 16:52

Message:
Logged In: YES 
user_id=43607

I'm not in charge of the language, but I give you very
little chance that this is accepted.

The XML standard has this to say about white space:

"An XML processor MUST always pass all characters in a
document that are not markup through to the application. A 
validating XML processor MUST also inform the application
which of these characters constitute white space appearing
in element content.

A special attribute named xml:space MAY be attached to an
element to signal an intention that in that element, white
space should be preserved by applications. In valid
documents, this attribute, like any other, MUST be declared
if it is used. When declared, it MUST be given as an
enumerated type whose values are one or both of "default"
and "preserve"."

If your XML processor doesn't pass on white space in the
presence of xml:space="preserve" it is in error and you
should complain to there.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1143855&group_id=5470


More information about the Python-bugs-list mailing list