xsl-list
[Top] [All Lists]

Re: [xsl] Insert elment in XSD

2008-02-29 08:30:47
Michael Kay wrote:

  Hi

I would be inclined to change:

   <xsl:element name="element" use-attribute-sets="ns1:definition" />
   <xsl:apply-templates/> 

to
   <xsl:variable name="x" select="xs:element[(_at_)name='booktitle']"/>
   <xsl:apply-templates select="$x/preceding-sibling::node()"/>
   <xsl:element name="element" use-attribute-sets="ns1:definition" />
   <xsl:apply-templates select="$x/(.,following-sibling::node())"/> 

  I didn't followed the thread carefully, but at the first
glance I would instead change:

    <xsl:template match="xs:schema">
       <xsl:copy>
          <xsl:element
              name="element" 
              use-attribute-sets="ns1:definition"/>
          <xsl:apply-templates/>
       </xsl:copy>
    </xsl:template>

to:

    <xsl:template match="xs:element[(_at_)name='booktitle']">
       <xsl:next-match/>
       <xsl:element
           name="element" 
           use-attribute-sets="ns1:definition"/>
    </xsl:template>

  Regards,

--drkm



















      
_____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
http://mail.yahoo.fr


--~------------------------------------------------------------------
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>