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. Add xml declaration statement using xslt.

Add xml declaration statement using xslt.

Scheduled Pinned Locked Moved XML / XSL
xmlquestion
4 Posts 3 Posters 11 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.
  • J Offline
    J Offline
    jagjit_surfer
    wrote on last edited by
    #1

    Hi Everybody. I want to add an extra declaration statement like '' in my o/p xml which is generated by xslt. Will anybody suggest me is there any way to do this using xslt?

    G 1 Reply Last reply
    0
    • J jagjit_surfer

      Hi Everybody. I want to add an extra declaration statement like '' in my o/p xml which is generated by xslt. Will anybody suggest me is there any way to do this using xslt?

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

      :confused: I don't know if this works but you can try placing this at the top of your main xsl:template:

      <xsl:processing-instruction name="qbxml">
      xsl:textversion="7.0"</xsl:text>
      </xsl:processing-instruction>

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

      J 1 Reply Last reply
      0
      • G George L Jackson

        :confused: I don't know if this works but you can try placing this at the top of your main xsl:template:

        <xsl:processing-instruction name="qbxml">
        xsl:textversion="7.0"</xsl:text>
        </xsl:processing-instruction>

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

        J Offline
        J Offline
        jagjit_surfer
        wrote on last edited by
        #3

        Thank You for help. It works perferctly.

        T 1 Reply Last reply
        0
        • J jagjit_surfer

          Thank You for help. It works perferctly.

          T Offline
          T Offline
          Travelthrprog
          wrote on last edited by
          #4

          when I tried in xslt 1.0 in vs2008 <xsl:processing-instruction name="xml"> xsl:textversion="1.0"</xsl:text> </xsl:processing-instruction> I am getting error xsl:processing-instruction cannot be a child of xsl:stylesheet

          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