Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Output not obtained

Output not obtained

Scheduled Pinned Locked Moved XML / XSL
xmltestingbeta-testingregexhelp
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fadi Yoosuf
    wrote on last edited by
    #1

    Hi... when I apply xsl transformation, no output is obtained. Can anyone help me? My xml file is --------------------- <?xml version="1.0" encoding="utf-8"?> <Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySpace>Testing</MySpace> </Data> --------------------- My xslt file is ----------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" indent="yes"/> <xsl:template match="/"> <value-of select="MySpace"/> </xsl:template> </xsl:stylesheet> ----------------------- Thanks Fadi

    L G 2 Replies Last reply
    0
    • F Fadi Yoosuf

      Hi... when I apply xsl transformation, no output is obtained. Can anyone help me? My xml file is --------------------- <?xml version="1.0" encoding="utf-8"?> <Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySpace>Testing</MySpace> </Data> --------------------- My xslt file is ----------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" indent="yes"/> <xsl:template match="/"> <value-of select="MySpace"/> </xsl:template> </xsl:stylesheet> ----------------------- Thanks Fadi

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Fadi Yoosuf wrote:

      when I apply xsl transformation, no output is obtained.

      When you apply it how? In what context?

      F 1 Reply Last reply
      0
      • L led mike

        Fadi Yoosuf wrote:

        when I apply xsl transformation, no output is obtained.

        When you apply it how? In what context?

        F Offline
        F Offline
        Fadi Yoosuf
        wrote on last edited by
        #3

        You can paste the xml and xslt I gave in w3schools' xslt tester. I have pasted the link below http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog[^] thanks fadi

        L 1 Reply Last reply
        0
        • F Fadi Yoosuf

          You can paste the xml and xslt I gave in w3schools' xslt tester. I have pasted the link below http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog[^] thanks fadi

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          Fadi, the bad news is you don't appear to have the requisite knowledge of the technologies you are working with to be attempting this task. A Web Browser is only going to display HTML.

          F 2 Replies Last reply
          0
          • L led mike

            Fadi, the bad news is you don't appear to have the requisite knowledge of the technologies you are working with to be attempting this task. A Web Browser is only going to display HTML.

            F Offline
            F Offline
            Fadi Yoosuf
            wrote on last edited by
            #5

            Thanks alot for the effective criticism. I overestimated (mistook) like the system had the facility to convert xml/text formats to html. Anyway "alerted hereafter" :) thanks Fadi

            1 Reply Last reply
            0
            • L led mike

              Fadi, the bad news is you don't appear to have the requisite knowledge of the technologies you are working with to be attempting this task. A Web Browser is only going to display HTML.

              F Offline
              F Offline
              Fadi Yoosuf
              wrote on last edited by
              #6

              Led, You argued like "A Web Browser is only going to display HTML." Was it a blind response? When you get time, make an html file, open it in edit mode and paste plain text in that. Try viewing in a browser and you can still see the plain text (which was written without html markups). Now try creating another .html file and paste some xml conent in that. Try viewing in a browser and you can still see the innertext of html nodes in a non formatted manner. Can you pls. explain the reason for this w.r.t. your argument?? Also can you try the default xml given in http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog[^]. Just change the xslt content as follows ---------------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Edited by XMLSpy® --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:for-each select="catalog/cd"> <xsl:value-of select="title"/> <xsl:value-of select="artist"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> ---------------------------- Now can you pls explain why the output is displayed in the browser even if it is in text format?? If you find a solution, can you pls. explain what is wrong with my code in the first post?? Sorry for disturbing you again It would be nice of you, if you can convince me with a good answer Thanks Fadi

              L 1 Reply Last reply
              0
              • F Fadi Yoosuf

                Hi... when I apply xsl transformation, no output is obtained. Can anyone help me? My xml file is --------------------- <?xml version="1.0" encoding="utf-8"?> <Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySpace>Testing</MySpace> </Data> --------------------- My xslt file is ----------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" indent="yes"/> <xsl:template match="/"> <value-of select="MySpace"/> </xsl:template> </xsl:stylesheet> ----------------------- Thanks Fadi

                G Offline
                G Offline
                George L Jackson
                wrote on last edited by
                #7

                The "MySpace" element is not the child of the root node as indicated in: <xsl:template match="/">. Also, "value-of" needs to be "xsl:value-of".

                "We make a living by what we get, we make a life by what we give." --Winston Churchill

                modified on Monday, June 1, 2009 2:12 PM

                F 1 Reply Last reply
                0
                • F Fadi Yoosuf

                  Led, You argued like "A Web Browser is only going to display HTML." Was it a blind response? When you get time, make an html file, open it in edit mode and paste plain text in that. Try viewing in a browser and you can still see the plain text (which was written without html markups). Now try creating another .html file and paste some xml conent in that. Try viewing in a browser and you can still see the innertext of html nodes in a non formatted manner. Can you pls. explain the reason for this w.r.t. your argument?? Also can you try the default xml given in http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog[^]. Just change the xslt content as follows ---------------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Edited by XMLSpy® --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:for-each select="catalog/cd"> <xsl:value-of select="title"/> <xsl:value-of select="artist"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> ---------------------------- Now can you pls explain why the output is displayed in the browser even if it is in text format?? If you find a solution, can you pls. explain what is wrong with my code in the first post?? Sorry for disturbing you again It would be nice of you, if you can convince me with a good answer Thanks Fadi

                  L Offline
                  L Offline
                  led mike
                  wrote on last edited by
                  #8

                  Fadi Yoosuf wrote:

                  Now can you pls explain why the output is displayed in the browser even if it is in text format??

                  It's not displayed in my browser. That is why I posted what I did and it's as far as I got in debugging your error. I was wrong. Thankfully George Jackson has backed me up and hopefully provided you with the solution. [modified] What is wrong with this post? You asked me to explain and I did?

                  1 Reply Last reply
                  0
                  • G George L Jackson

                    The "MySpace" element is not the child of the root node as indicated in: <xsl:template match="/">. Also, "value-of" needs to be "xsl:value-of".

                    "We make a living by what we get, we make a life by what we give." --Winston Churchill

                    modified on Monday, June 1, 2009 2:12 PM

                    F Offline
                    F Offline
                    Fadi Yoosuf
                    wrote on last edited by
                    #9

                    thank you very much George.... it is really helpful @ this situation... led, lemme thank u also for ur efforts.(but you should understand the seriousness of misguiding someone(and all who read the post) with respect to a temporary output. there were errors in my xslt. you didn't even point out that. What if I had blindly believed you!!!!!)

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups