Re: [xsl] Removing <?xml ... output

Subject: Re: [xsl] Removing <?xml ... output
From: Jon Gorman <jonathan.gorman@xxxxxxxxx>
Date: Fri, 25 Feb 2005 10:21:45 -0600
On Fri, 25 Feb 2005 11:04:20 -0600, Charles Ohana
<charles.ohana@xxxxxxxxxxxxxx> wrote:
> Thanks Emmanouil,
> But how do I do that ???

Straight from the spec (xslt 1)

16 Output

<!-- Category: top-level-element -->
  method = "xml" | "html" | "text" | qname-but-not-ncname
  version = nmtoken
  encoding = string
  omit-xml-declaration = "yes" | "no"
  standalone = "yes" | "no"
  doctype-public = string
  doctype-system = string
  cdata-section-elements = qnames
  indent = "yes" | "no"
  media-type = string />

omit-xml-declaration  is what you're probably seeking.

> Also the problem is weird. I only have the issue if I put a link inside...
> How do I get around that ???
> See below
> The xsl below add the <?xml version="1.0" encoding="utf-8"?>
> <xsl:for-each select="ApplicationCatalogue">
>    <a href="..."><xsl:value-of select="@code" /></a>
> </xsl:for-each>
> The xsl below doesn't add the <?xml ....
> <xsl:for-each select="ApplicationCatalogue">
>    <xsl:value-of select="@code" />
> </xsl:for-each>

I recall something like this in the faq/archives.  Might be a
processor quirk, or has to do with output format.  Notice in the first
example you have <a href="">, not <element name="a">  although I don't
know if that would change it.  My supicion is that it has to do with
the output format.     Search the faq, the archives, or the manual for
your processor and you will most likely find the answer.

Jon Gorman

Current Thread