Re: [xsl] Losing schemalocation

Subject: Re: [xsl] Losing schemalocation
From: Karl Stubsjoen <kstubs@xxxxxxxxx>
Date: Wed, 16 Feb 2005 09:34:38 -0700
So I'm a bit lost... not sure what is copying the xsl:stylesheet node,
but it should grab all.
This is the top level match:

<!-- get top level node -->
<xsl:template match="@* | node()">
	<xsl:apply-templates select="@* | node()"/>

Ahhh... maybe the problem is this, that I need to explicitly add these
instructions.  These elements are not part of the original XML source
(that is being transformed) and I do need to add these elements.  My
mistake, I added these processing instructions to the identity
tranformation stylesheet (as instructions for the stylesheet).  So...
where and how do I add these further processing instructions?

Original XML is looking like this:
<?xml version="1.0" encoding="utf-8"?>

Expected result is:

<?xml version="1.0"?>
<sd:DataRoot xmlns:sd="";

Ohh man, I'm being stupid!  It appears that the expected output has
the processing instructions as part of the root data source, but is
the common practice, or should it appear as part of the <?xml ... ?>

Someone set me straight.  Where do processing instructions belong in
an XML source?

On Wed, 16 Feb 2005 08:27:15 +0200, Jarno.Elovirta@xxxxxxxxx
<Jarno.Elovirta@xxxxxxxxx> wrote:
> Hi,
> > I have the following decleration:
> >
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="";
> > xmlns:sd="";
> > xmlns:xsi="";
> > xsi:schemaLocation="
> > /2001/1.0
> >";
> > xmlns:date="";
> > exclude-result-prefixes="date">
> >
> > Upon transformation, I am losing the following:
> >
> > xmlns:xsl=...
> > xsl:schemaLocation=...
> >
> > What is missing in my identity transformation?
> Depends on what your identity transformation looks like. Does the template that matches xsl:stylesheet copy all of its attributes?
> Cheers,
> Jarno - Nick Sentience: March 2003 Mix

Current Thread