[xsl] Version 2.0 Tips and Tricks

Subject: [xsl] Version 2.0 Tips and Tricks
From: "Pankaj Chaturvedi" <pankaj.chaturvedi@xxxxxxxxx>
Date: Fri, 4 Apr 2008 12:49:06 +0530
Hello,

I am stuck with another problem using version 2.0...Now the processor is
showing error with the following code:

<xsl:template match="@*|node()">
   <xsl:copy>
	<xsl:apply-templates select="@*|node()"/>
   </xsl:copy>
 </xsl:template>

Error: An attribute cannot be added after a child (and highlighting
xsl:copy).

Interestingly this is happening when I use a special journal check for
reference style which looks like following.

<journalcode>CIJB</journalcode>

 <xsl:template match="ref-govpub">

<!-- journal Code check  -->

 <xsl:if test="string(//journalcode)='CIJB'">
   <xsl:copy>
  <xsl:attribute name="aid:pstyle">ref</xsl:attribute>
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates select="authorfield"/>
  <xsl:apply-templates select="docpubtitle"/>
  <xsl:apply-templates select="pubnum"/>
  <xsl:apply-templates select="pubfield"/>
<xsl:if test="./chaptitle">
<char><xsl:text>, </xsl:text></char>
    <xsl:apply-templates select="chaptitle"/>
</xsl:if>
    <xsl:if test="./addinfo">
    <xsl:apply-templates select="./addinfo"/>
</xsl:if>
 <xsl:apply-templates mode="F-chic-auth-date"/>
<char><xsl:text>.</xsl:text></char>
   </xsl:copy>
   </xsl:if>
</xsl:template>


Can somebody throw some light what could be possible reasons. I want to use
the version 2.0 hereafter but alas I still have to receive "Mike Kay" book
for reference. Is there are any specif differences which needs to be taken
care of for using 2.0.

looking for suggestions.

Best,

Pankaj Chaturvedi

============================================================================
================


Confidentiality Notice:" This message and any attachment(s)
contained here are information that is confidential, proprietary to
IDS Infotech Ltd. and its customers.
Contents may be privileged or otherwise protected by law. The
information is solely intended for the individual or the entity it
is addressed to. If you are not the intended recipient of this
message, you are not authorized to read, forward, print, retain,
copy or disseminate this message or any part of it. If you have
received this e-mail in error, please notify the sender immediately
by return e-mail and delete it from your computer."

Current Thread