xsl-list
[Top] [All Lists]

Re: [xsl] Version 2.0 Tips and Tricks

2008-04-04 00:30:31
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(_dot_)chaturvedi(_at_)idsil(_dot_)com> 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."

 --~------------------------------------------------------------------
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
 To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
 or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
 --~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>