[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Python - CGI - XML - XSD

xkenneth

3/12/2008 4:31:00 AM

Hi All,

Quick question. I've got an XML schema file (XSD) that I've
written, that works fine when my data is present as an XML file.
(Served out by apache2.) Now when I call python as a cgi script, and
tell it print out all of the same XML, also served up by apache2, the
XSD is not applied. Does this have to do with which content type i
defined when printing the xml to stdout?

Regards,
Kenneth Miller
5 Answers

Diez B. Roggisch

3/12/2008 11:33:00 AM

0

xkenneth wrote:

> Hi All,
>
> Quick question. I've got an XML schema file (XSD) that I've
> written, that works fine when my data is present as an XML file.
> (Served out by apache2.) Now when I call python as a cgi script, and
> tell it print out all of the same XML, also served up by apache2, the
> XSD is not applied. Does this have to do with which content type i
> defined when printing the xml to stdout?

Who's applying the stylesheet? The browser, some application like XmlSpy or
what?

Diez

xkenneth

3/12/2008 4:29:00 PM

0

On Mar 12, 6:32 am, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
> xkenneth wrote:
> > Hi All,
>
> >    Quick question. I've got an XML schema file (XSD) that I've
> > written, that works fine when my data is present as an XML file.
> > (Served out by apache2.) Now when I call python as a cgi script, and
> > tell it print out all of the same XML, also served up by apache2, the
> > XSD is not applied. Does this have to do with which content type i
> > defined when printing the xml to stdout?
>
> Who's applying the stylesheet? The browser, some application like XmlSpy or
> what?
>
> Diez

The browser.

Regards,
Kenneth Miller

Stefan Behnel

3/12/2008 4:59:00 PM

0

xkenneth wrote:
> On Mar 12, 6:32 am, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
>> xkenneth wrote:
>>> Hi All,
>>> Quick question. I've got an XML schema file (XSD) that I've
>>> written, that works fine when my data is present as an XML file.
>>> (Served out by apache2.) Now when I call python as a cgi script, and
>>> tell it print out all of the same XML, also served up by apache2, the
>>> XSD is not applied. Does this have to do with which content type i
>>> defined when printing the xml to stdout?
>> Who's applying the stylesheet? The browser, some application like XmlSpy or
>> what?
>
> The browser.

Well, why should it validate your file? Browsers don't do that just for fun.

Stefan

xkenneth

3/12/2008 6:11:00 PM

0

On Mar 12, 11:58 am, Stefan Behnel <stefan...@behnel.de> wrote:
> xkenneth wrote:
> > On Mar 12, 6:32 am, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
> >> xkenneth wrote:
> >>> Hi All,
> >>>    Quick question. I've got an XML schema file (XSD) that I've
> >>> written, that works fine when my data is present as an XML file.
> >>> (Served out by apache2.) Now when I callpythonas a cgi script, and
> >>> tell it print out all of the same XML, also served up by apache2, the
> >>>XSDis not applied. Does this have to do with which content type i
> >>> defined when printing the xml to stdout?
> >> Who's applying the stylesheet? The browser, some application like XmlSpy or
> >> what?
>
> > The browser.
>
> Well, why should it validate your file? Browsers don't do that just for fun.
>
> Stefan

Sorry, it was really late when i wrote this post. The file is an XSL
file. It defines HTML depending on what appears in the XML document.

Regards,
Kenneth Miller

Diez B. Roggisch

3/13/2008 1:09:00 PM

0

> Sorry, it was really late when i wrote this post. The file is an XSL
> file. It defines HTML depending on what appears in the XML document.

Then the content-type might be the culprit, yes. But testing so would have
been faster than waiting for answers here...

Diez