﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
111	Genshi strips XML namespace declaration	Alec Thomas <alec@…>	cmlenz	"Given the input:

{{{
#!xml
<?xml version=""1.0"" encoding=""utf-8""?>
<root />
}}}

Genshi currently produces:

{{{
#!xml
<root />
}}}

This is because the XML namespace is distinct from processing instructions, thus Expat has a distinct callback for it. This callback is not currently handled by Genshi.

Patch attached which adds an XML_DECL type, which effectively just contains the values passed through from Expat. eg.

{{{
XML_DECL (u'1.0', u'utf-8', 1) ('feed.xml', 1, 0)
}}}

Outputs as:

{{{
#!xml
<?xml version=""1.0"" encoding=""utf-8"" standalone=""yes""?>
}}}

I didn't add XPath support for it, as apparently [http://www.w3.org/TR/xpath#section-Processing-Instruction-Nodes it's not a valid node] (this is the only reference that I could find in the spec').

(Note that Expat doesn't appear to generate text elements between the XML decl and the first element, so the unit tests explicitly use \n)"	defect	closed	major	0.4.1	Parsing	0.3.6	fixed		
