Hello, [XML] Is there something to change?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • universalbitmapper

    Hello, [XML] Is there something to change?

    Hi,

    I'm a newbie in XML/XSLT trying to get some HTML output from a simple
    XML source that starts with:

    QUOTE:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="letter2te xt.xsl" version="1.0"?>
    /QUOTE

    I ran phpinfo();
    Here is what I gathered:
    QUOTE:
    libxml
    libXML support active
    libXML Version 2.6.22
    libXML streams enabled

    SimpleXML
    Simplexml support enabled
    Revision $Revision: 1.151.2.10 $
    Schema support enabled

    xml
    XML Support active
    XML Namespace Support active
    libxml2 Version 2.6.22


    xmlreader
    XMLReader enabled


    xmlwriter
    XMLWriter enabled

    /QUOTE

    The problem is that I keep seeing the XML source in IE6, not the
    formatted data.

    Your help much appreciated

  • Ivan Marsh

    #2
    Re: Hello, [XML] Is there something to change?

    On Fri, 23 Jun 2006 13:59:51 -0700, universalbitmap per wrote:
    [color=blue]
    > QUOTE:
    > <?xml version="1.0"?>
    > <?xml-stylesheet type="text/xsl" href="letter2te xt.xsl" version="1.0"?>
    > /QUOTE[/color]

    Did you remember to send the XML header? That killed me for about two
    hours last night.

    header("Content-type: text/xml");

    --
    The USA Patriot Act is the most unpatriotic act in American history.
    Feingold-Obama '08 - Because the Constitution isn't history,
    It's the law.

    Comment

    • universalbitmapper

      #3
      Re: Hello, [XML] Is there something to change?


      Ivan Marsh wrote:[color=blue]
      > On Fri, 23 Jun 2006 13:59:51 -0700, universalbitmap per wrote:
      >[color=green]
      > > QUOTE:
      > > <?xml version="1.0"?>
      > > <?xml-stylesheet type="text/xsl" href="letter2te xt.xsl" version="1.0"?>
      > > /QUOTE[/color]
      >
      > Did you remember to send the XML header? That killed me for about two
      > hours last night.
      >
      > header("Content-type: text/xml");
      >
      > --
      > The USA Patriot Act is the most unpatriotic act in American history.
      > Feingold-Obama '08 - Because the Constitution isn't history,
      > It's the law.[/color]

      Hi,

      When you write that I should send the XML header, you mean that I would
      be
      calling a .php source in IE6.
      But not at all, I'm only trying the first sample code provided in a
      manual,
      that says that xslt makes the join between the xml source and html
      output.
      I'm utterly confused, but I don't dislike it.
      It's going to be a lot of fun when I find (or most probably a generous
      nethelper finds)
      the error.
      Maybe I should skip the beginner's stuff and zero in the php/xml
      chapter;
      actually the manual is called XML Web Development with PHP (Sitepoint)

      thanks for your help

      Comment

      • universalbitmapper

        #4
        Re: Hello, [XML] Is there something to change?


        universalbitmap per wrote:[color=blue]
        > Ivan Marsh wrote:[color=green]
        > > On Fri, 23 Jun 2006 13:59:51 -0700, universalbitmap per wrote:
        > >[color=darkred]
        > > > QUOTE:
        > > > <?xml version="1.0"?>
        > > > <?xml-stylesheet type="text/xsl" href="letter2te xt.xsl" version="1.0"?>
        > > > /QUOTE[/color]
        > >
        > > Did you remember to send the XML header? That killed me for about two
        > > hours last night.
        > >
        > > header("Content-type: text/xml");
        > >
        > > --
        > > The USA Patriot Act is the most unpatriotic act in American history.
        > > Feingold-Obama '08 - Because the Constitution isn't history,
        > > It's the law.[/color]
        >
        > Hi,
        >
        > When you write that I should send the XML header, you mean that I would
        > be
        > calling a .php source in IE6.
        > But not at all, I'm only trying the first sample code provided in a
        > manual,
        > that says that xslt makes the join between the xml source and html
        > output.
        > I'm utterly confused, but I don't dislike it.
        > It's going to be a lot of fun when I find (or most probably a generous
        > nethelper finds)
        > the error.
        > Maybe I should skip the beginner's stuff and zero in the php/xml
        > chapter;
        > actually the manual is called XML Web Development with PHP (Sitepoint)
        >
        > thanks for your help[/color]


        Hi again,

        Just like I said, I ran a php source with the line
        ..
        ..
        $doc->load("keywor d-data.xml");
        ..
        ..
        And it works fine.
        I'm going to write the ultimate "Bluff your way into XML/PHP" guide ;-)

        Comment

        • Tony Marston

          #5
          Re: Hello, [XML] Is there something to change?

          There are two ways of transforming XML into HTML using an XSL stylesheet:
          (a) on the server
          (b) on the client (if your browser supports it)

          If you visit http://www.tonymarston.net/sample/index.html you will see links
          to my sample application which allow you to do both. You can then download
          the source code to see how it's done.

          --
          Tony Marston
          This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL

          Build apps faster with Rapid Application Development using open-source RAD tools, modern RAD frameworks, and rapid application design methods.


          "universalbitma pper" <jbmorla@gmail. com> wrote in message
          news:1151096391 .154650.79340@m 73g2000cwd.goog legroups.com...[color=blue]
          > Hi,
          >
          > I'm a newbie in XML/XSLT trying to get some HTML output from a simple
          > XML source that starts with:
          >
          > QUOTE:
          > <?xml version="1.0"?>
          > <?xml-stylesheet type="text/xsl" href="letter2te xt.xsl" version="1.0"?>
          > /QUOTE
          >
          > I ran phpinfo();
          > Here is what I gathered:
          > QUOTE:
          > libxml
          > libXML support active
          > libXML Version 2.6.22
          > libXML streams enabled
          >
          > SimpleXML
          > Simplexml support enabled
          > Revision $Revision: 1.151.2.10 $
          > Schema support enabled
          >
          > xml
          > XML Support active
          > XML Namespace Support active
          > libxml2 Version 2.6.22
          >
          >
          > xmlreader
          > XMLReader enabled
          >
          >
          > xmlwriter
          > XMLWriter enabled
          >
          > /QUOTE
          >
          > The problem is that I keep seeing the XML source in IE6, not the
          > formatted data.
          >
          > Your help much appreciated
          >[/color]


          Comment

          • universalbitmapper

            #6
            Re: Hello, [XML] Is there something to change?


            Tony Marston wrote:[color=blue]
            > There are two ways of transforming XML into HTML using an XSL stylesheet:
            > (a) on the server
            > (b) on the client (if your browser supports it)
            >
            > If you visit http://www.tonymarston.net/sample/index.html you will see links
            > to my sample application which allow you to do both. You can then download
            > the source code to see how it's done.
            >
            > --
            > Tony Marston
            > http://www.tonymarston.net
            > http://www.radicore.org
            >
            > "universalbitma pper" <jbmorla@gmail. com> wrote in message
            > news:1151096391 .154650.79340@m 73g2000cwd.goog legroups.com...[color=green]
            > > Hi,
            > >
            > > I'm a newbie in XML/XSLT trying to get some HTML output from a simple
            > > XML source that starts with:
            > >
            > > QUOTE:
            > > <?xml version="1.0"?>
            > > <?xml-stylesheet type="text/xsl" href="letter2te xt.xsl" version="1.0"?>
            > > /QUOTE
            > >
            > > I ran phpinfo();
            > > Here is what I gathered:
            > > QUOTE:
            > > libxml
            > > libXML support active
            > > libXML Version 2.6.22
            > > libXML streams enabled
            > >
            > > SimpleXML
            > > Simplexml support enabled
            > > Revision $Revision: 1.151.2.10 $
            > > Schema support enabled
            > >
            > > xml
            > > XML Support active
            > > XML Namespace Support active
            > > libxml2 Version 2.6.22
            > >
            > >
            > > xmlreader
            > > XMLReader enabled
            > >
            > >
            > > xmlwriter
            > > XMLWriter enabled
            > >
            > > /QUOTE
            > >
            > > The problem is that I keep seeing the XML source in IE6, not the
            > > formatted data.
            > >
            > > Your help much appreciated
            > >[/color][/color]

            Many thanks Tony for providing the link to your demo site.
            I filed it in the XML bookmarks,
            At the moment I'm wrestling with htmlspecialchar s() that don't work
            I wonder if the trial Zend Studio Client and Server haven't messed up
            my XP installation, because a lot of things don't work.
            Thanks again

            Jay Blue (the first task)

            Comment

            Working...