[XML-SIG] PEPs for PyXML?

Thomas B. Passin tpassin@home.com
Sat, 16 Feb 2002 12:26:49 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_00D2_01C1B6E5.34D058C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

[Uche Ogbuji]


> I guess Tom Passim had a point with the PyXML PEP idea.  :-)

Thanks, Uchi!

I'd still like to see them, if only to collect the consensus on key issues.
I get completely lost sometimes - I keep my own copy of all the messages and
it's still hard to go back and find out what if anything was settled and
how.  If that information were captured in a PEP or something, everyone
could find out, and offer suggestions.

To make that a bit easier, I've attached a DTD and css stylesheet for xml
PEPs, a slight variation on what I sent in last year.  The style sheet does
a pretty nice job of displaying the xml file in Mozilla and Opera (less good
in IE 5.5, and I don't know about IE6 but suppose it would be better).
Those two browsers can even display attribute values, not just element
character content, using regular css styles.

But the real reason for the css style sheet was so I could experiment with
xxe, the new xml editor that lets you do more-or-less wysiwig editing if you
have a css style sheet and a dtd.  If you don't know it, it's written in
java, the beta is free, and when it is commercially released they say the
basic version will remain free.

It actually works and I recommend trying it.  It takes a bit of doing to
learn how to insert elements where you want them, and it has a few other
quirks, but once you have a decent style sheet it's really quite nice (you
can edit without a style sheet or dtd, but you only get a tree view then,
not a styled view).  This product could make it fairly easy to create and
edit PEPs in XML form, especially since it uses xml templates you build.
XML Spy can do this too, but costs a lot and is much more complex to set up
page display with, I think.

Get it at

http://www.xmlmind.com/xmleditor/index.html

On Windows I had to use their batch file to run it, not their supplied .exe
launcher (didn't work), and it may take a bit of tuning to get the batch
file to work, but it can be done (Win2000 and WinMe).

Sorry about using attachements but I thought it would be handier than
putting them in-line.

Cheers,

Tom P

------=_NextPart_000_00D2_01C1B6E5.34D058C0
Content-Type: text/css;
	name="pep.css"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="pep.css"

xmlpep {display:block}
headers,abstract,specification,
rationale,referenceImplementation,
notes,references,copyright {display:block}

pepNumber,pepTitle,pepVersion,
cvsVersionString,
listOfAuthors,author,status,type,
created,history,post,para,
referenceImplementation,
copyright {display:block;font-weight:normal}

para,code {display:block}=20

headers {font-weight:bold;margin-top:1ex;}

abstract,specification,rationale,
referenceImplementation,
copyright {margin-top: 1ex}
para {margin-left:1ex;margin-bottom:1ex}
code  {margin-left:2ex;
	margin-top:1ex;margin-bottom:1ex}
code {font-family:monospace}

headers:before{content:"Headers:";font-weight:bold}
pepNumber:before {content:"PEP Number: ";
	font-size:90%;
	font-weight:bold;margin-left:2ex}
pepTitle:before {content:"PEP Title: ";
	font-size:90%;
	font-weight:bold;margin-left:2ex}
pepVersion:before {content:"PEP Version: ";
	font-size:90%;
	font-weight:bold;margin-left:2ex}
cvsVersionString:before {content:"CVS Version String: ";
	font-size:90%;
	font-weight:bold;margin-left:2ex}

listOfAuthors:before {content:"Authors";font-size:90%;
	font-weight:bold;margin-left:2ex}
author {margin-left:4ex;font-weight:normal}
author:before {content:attr(name) " (email: "attr(email) =
')';margin-left:4ex}

status:before {content:"Status: ";
	font-size:90%;
	font-weight:bold;margin-left:2ex}
type:before {content:"Type: ";
	font-size:90%;
	font-weight:bold;margin-left:2ex}
created:before {content:"Created: ";
	font-size:90%;
	font-weight:bold;margin-left:2ex}
history:before {content:"Version History: ";
	font-size:90%;
	font-weight:bold;margin-left:2ex}

post {margin-left:4ex;font-weight:normal}
post:before {content:attr(date) "  ";font-size:90%;
	font-weight:bold;margin-left:4ex;}

abstract:before{font-weight:bold;
	font-size:90%;content:"Abstract:"}


specification:before {font-weight:bold;
	font-size:90%;content:"Specification:"}

rationale:before {font-weight:bold;
	font-size:90%;content:"Rationale:"}

referenceImplementation:before {font-weight:bold;
	font-size:90%;content:"Reference Implementation:"}

notes:before {font-weight:bold;
	font-size:90%;content:"Notes:"}

references:before {font-weight:bold;
	font-size:90%;content:"References:"}

copyright:before {font-weight:bold;
	font-size:90%;content:"Copyright:"}
------=_NextPart_000_00D2_01C1B6E5.34D058C0
Content-Type: text/xml;
	name="pep.dtd"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="pep.dtd"

<!ELEMENT xmlpep (headers,abstract?,specification,rationale?,
	referenceImplementation?,notes?,references?,copyright)>
<!ELEMENT headers (pepNumber,pepTitle,pepVersion,
	cvsVersionString?,listOfAuthors,status,type,created,history)>

<!ELEMENT pepNumber (#PCDATA)>
<!ELEMENT pepTitle (#PCDATA)>
<!ELEMENT pepVersion (#PCDATA)>
<!ELEMENT cvsVersionString (#PCDATA)>
<!ELEMENT listOfAuthors (author+)>
<!ELEMENT author EMPTY>
	<!ATTLIST author name CDATA #REQUIRED
		email CDATA #IMPLIED>	

<!ELEMENT status (#PCDATA)>
<!ELEMENT type (#PCDATA)>
<!ELEMENT created (#PCDATA)>
<!ELEMENT history (post*)>
<!ELEMENT post (#PCDATA)>
	<!ATTLIST post date CDATA #REQUIRED>

<!ELEMENT para (#PCDATA|code)*>
	<!ATTLIST para title CDATA #IMPLIED>
<!ELEMENT code (#PCDATA)>

<!ELEMENT abstract (#PCDATA)>
<!ELEMENT specification (para)*>
<!ELEMENT rationale (para*)>
<!ELEMENT referenceImplementation (#PCDATA)>
<!ELEMENT notes (para*)>
<!ELEMENT references (#PCDATA)>
<!ELEMENT copyright (#PCDATA)>

------=_NextPart_000_00D2_01C1B6E5.34D058C0
Content-Type: text/xml;
	name="pep.xml"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="pep.xml"

<?xml version=3D'1.0'?>=0A=
<?xml-stylesheet type=3D'text/css'  href=3D'pep.css'?>=0A=
<xmlpep>=0A=
	<headers>=0A=
		<pepNumber>xmlpep-1</pepNumber>=0A=
		<pepTitle>Values for Null Or Empty Namespace URIs</pepTitle>=0A=
		<pepVersion>0.15</pepVersion>=0A=
		<cvsVersionString/>=0A=
		<listOfAuthors>=0A=
			<author name=3D'Thomas B. Passin' email=3D'tpassin@home.com'/>=0A=
		</listOfAuthors>=0A=
		<status>Draft</status>=0A=
		<type>Standards Track</type>=0A=
		<created>29-Jan-2001</created>=0A=
		<history>=0A=
			<post date=3D'16-Feb-2002'>version 0.15 released with=20
				minor changes to DTD and minor content cleanup.</post>=0A=
			<post date=3D'29-Jan-2001'>version 0.10 released.</post>=0A=
		</history>=0A=
	</headers>=0A=
	<abstract>=0A=
		This PEP specifies the proper values of the Namespace URI property =0A=
		when its value might appear to be either "null", "None", or the =0A=
		empty string.=0A=
		=0A=
		This XMLPEP, when approved, will apply to all namespace-aware software=0A=
		maintained by the pyxml interest group.=0A=
	</abstract>=0A=
	<specification>=0A=
		<para title=3D'Namespace-aware applications'>=0A=
			When no namespace has been declared whose scope applies to a=0A=
			particular element or attribute, the application MUST report the=0A=
			URI of the namespace of the element or attribute as None.=0A=
			=0A=
			When a namespace applies but its URI value is empty or null or None, =0A=
			the application MUST report the URI of the namespace value as None.=0A=
		</para>=0A=
		<para title=3D'Namespace-ignorant applications'>=0A=
			This requirement does not apply for applications that are not=0A=
			namespace-aware.=0A=
		</para>=0A=
		<para title=3D'Applicability'>=0A=
			Applies to all XML processing software maintained by the pyxml=0A=
			interest group.=0A=
		</para>=0A=
	</specification>=0A=
	<rationale>=0A=
		<para title=3D'Definitive Treatment Needed'>=0A=
		This PEP is needed because of continued uncertainty among varous pyxml=0A=
		developers as to the proper values to use, and because of inconsistency=0A=
		among various pyxml products.  Differences between Python, IDL, and =
Java =0A=
		make it difficult to interpret existing W3C Recommendations =0A=
		unambiguously in this regard.=0A=
		=0A=
		A definitive and consistent treatment is needed so that all the pyxml=0A=
		software may be brought into agreement.=0A=
		</para>=0A=
		=0A=
		<para title=3D'Arguments for "None"'>=0A=
			Most references in the Recommendations to the cases in question=0A=
			refer to "null" values.  Python offers a data object well adapted to=0A=
			indicate such values.  It is the None object.  The None object can=0A=
			be tested for exactly as for an empty string:=0A=
			=0A=
				<code>if uri:=0A=
						doYourThing()=0A=
				</code>=0A=
				=0A=
			Alternatively, None can be tested for explicitly, as in:=0A=
			=0A=
				<code>if uri is not None:=0A=
						doYourThing()=0A=
				</code>=0A=
				=0A=
			Thus, None is flexible enough to be useful in this application.=0A=
			Should there be some situation in which the use of an empty string =0A=
			would be logical or advantageous, it would be clearly distinguishable =0A=
			from the normal case where the value is None.=0A=
			=0A=
			Future versions of this PEP should specify clearly in what=0A=
			situations, if any, an empty string should be used in lieu of=0A=
			the None object.=0A=
		</para>=0A=
=0A=
	</rationale>=0A=
	<referenceImplementation>[Should there be a reference here to one=0A=
		particular processor, such as xmlproc?]=0A=
	</referenceImplementation>=0A=
	<notes></notes>=0A=
	<references></references>=0A=
	<copyright>This PEP may be used by anyone.</copyright>=0A=
</xmlpep>=0A=

------=_NextPart_000_00D2_01C1B6E5.34D058C0--