Subject: Re: [xsl] Version 2.0 Tips and Tricks From: "bryan rasmussen" <rasmussen.bryan@xxxxxxxxx> Date: Fri, 4 Apr 2008 09:30:03 +0200 |
why are you copying an attribute and then attempting to apply templates on attributes or nodes below it? On Fri, Apr 4, 2008 at 9:19 AM, Pankaj Chaturvedi <pankaj.chaturvedi@xxxxxxxxx> wrote: > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Version 2.0 Tips and Tricks, Pankaj Chaturvedi | Thread | RE: [xsl] Version 2.0 Tips and Tric, Pankaj Chaturvedi |
[xsl] Version 2.0 Tips and Tricks, Pankaj Chaturvedi | Date | RE: [xsl] Version 2.0 Tips and Tric, Pankaj Chaturvedi |
Month |