Re: [xsl] Problem with doctype-system in transformation xml to xml

Subject: Re: [xsl] Problem with doctype-system in transformation xml to xml
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 7 Dec 2005 16:37:18 GMT
  Now i have all the attributes of the xsl:stylesheet element as attributes of
  my top-level element in the destination xml-file.


sorry, I hav eno idea what you mean by this.

some comments on your file

    <xsl:when test="/C/D/E[position()=1]">

the [position()=1] isn't doing anything in a test, if there are any E
elements, there will be one with position 1. so that is the same as



    <xsl:when test="/C/D/E">

So if this is true, you generate an A element.


            <xsl:variable name="doc_name" select="."></xsl:variable>

You don't need that variable, you could just use document(string(.)) in
the line below. (You could use  document(.) but then relative URI will
be resolved relative to the source doc rather than relative to the
stylesheet)

        <xsl:variable name="nodename" select="A/CATEGORY"></xsl:variable>
again you don't need that variable)

            <xsl:when test="$nodename='test'">

<xsl:call-template name="copy">
This should generate an error unless you have a bilingual xslt engine as
your template is called
<xsl:template name="Kopie">
assuming that is the template you mean it will not generate any output
as
if the test was true, A/CATEGORY must have value 'test' and so in
particular the top level element in your source file is <A>.

so 
<xsl:copy-of
select="MSRSW/SW-SYSTEMS/SW-SYSTEM/SW-COMPONENT-SPEC/*"></xsl:copy-of>

will select nothing as it's looking for an element named MSRSW

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread