Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python - CGI - XML - XSD

Reply
Thread Tools

Python - CGI - XML - XSD

 
 
xkenneth
Guest
Posts: n/a
 
      03-12-2008
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
 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      03-12-2008
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
 
Reply With Quote
 
 
 
 
xkenneth
Guest
Posts: n/a
 
      03-12-2008
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
 
Reply With Quote
 
Stefan Behnel
Guest
Posts: n/a
 
      03-12-2008
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
 
Reply With Quote
 
xkenneth
Guest
Posts: n/a
 
      03-12-2008
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
 
Reply With Quote
 
Diez B. Roggisch
Guest
Posts: n/a
 
      03-13-2008
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert XML to XSD? or DTD to XSD? Matt XML 3 09-11-2008 12:40 PM
Overriding XSD locations when validating an xml document with multiple xsd references anthony@jayasekera.net Java 0 08-25-2006 11:22 AM
Validation of XSD (XML Schema) against XSD Rushi XML 1 12-09-2005 08:12 AM
XML + XSD: Is it possible to get all errors against the XSD? Markus Java 1 11-22-2005 02:53 PM
XML schema - Make xsd include another xsd stiank81 XML 4 06-26-2005 05:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57