[[ Anyone working with XML & XMLSubs might want to read this ]]
Marcus Zoller wrote: > > Hi! Here is some change I made... > > The first line in ASP::ParseXMLSubs removes any <?xml version ... ?> > parser directive. This is a big problem when the encoding information > is required because the parser assumes it is UTF-8 if no encoding was > set. > > I removed the line and now anything works fine. Maybe this should be > removed at all in the next release.. I can't see any reason to cut that > instruction from the document...!? > This is the offending Apache::ASP code: unless($self->{asp}{xslt}) { $data =~ s|\s*\<\?xml\s+version\s*\=[^\>]+\?\>||is; } and it was put there with the idea that XMLSubs could be used to fully render an XML document. In sample XML hello world type docs, this could work by just ripping the tag out. I am not saying it should stay but that is why it is there... Perhaps if there were a secondary check on the ContentType, and only if its a text/html doc will it rip out the <?xml version ...> type tags on the fly ( not at parse time )? What ContentType would be set when serving just a .xml file in your case? text/xml? Or are your filtering XML to a post processor like AxKit ? The code could be moved from from the parse phase to the flush phase for text/html docs only with XMLSubs turned on, but that really begs the question whether XMLSubs functionality should even care about tags like <?xml...>. It seems like in an effort to be able to deal with XML docs all on its own, it should offer some mechanism for dealing with this tags too, but am at a loss for how this should be done. Any ideas? --Josh _________________________________________________________________ Joshua Chamas Chamas Enterprises Inc. NodeWorks Founder Huntington Beach, CA USA http://www.nodeworks.com 1-714-625-4051 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]