Python - CGI - XML - XSD

Discussion in 'Python' started by xkenneth, Mar 12, 2008.

  1. xkenneth

    xkenneth Guest

    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
     
    xkenneth, Mar 12, 2008
    #1
    1. Advertising

  2. 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
     
    Diez B. Roggisch, Mar 12, 2008
    #2
    1. Advertising

  3. xkenneth

    xkenneth Guest

    On Mar 12, 6:32 am, "Diez B. Roggisch" <> 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
     
    xkenneth, Mar 12, 2008
    #3
  4. xkenneth wrote:
    > On Mar 12, 6:32 am, "Diez B. Roggisch" <> 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
     
    Stefan Behnel, Mar 12, 2008
    #4
  5. xkenneth

    xkenneth Guest

    On Mar 12, 11:58 am, Stefan Behnel <> wrote:
    > xkenneth wrote:
    > > On Mar 12, 6:32 am, "Diez B. Roggisch" <> 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
     
    xkenneth, Mar 12, 2008
    #5
  6. > 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
     
    Diez B. Roggisch, Mar 13, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,192
    Markus
    Nov 22, 2005
  2. Matt
    Replies:
    3
    Views:
    37,345
    MKNDK
    Sep 11, 2008
  3. stiank81
    Replies:
    4
    Views:
    15,519
    stiank81
    Jun 26, 2005
  4. Rushi
    Replies:
    1
    Views:
    585
  5. Replies:
    0
    Views:
    581
Loading...

Share This Page