xsl-list
[Top] [All Lists]

Re: [xsl] Updating Attribute Values

2013-08-15 10:07:19
Hi there,

The usual answer to this is "namespaces". I don't know what namespace the <dao> element is in, but the way your template is written assumes that it's in the default namespace for the transformation (usually defined with @xpath-default-namespace. If not, you probably need to create a namespace prefix for it.

If that's not it, then we should probably see the rest of your transformation file. I did notice that you're using XSLT 2.0 with Saxon 6.5.5, which is not a good idea; for XSLT 2.0, use Saxon 9x if you can.

Cheers,
Martin

On 13-08-15 07:41 AM, Nathan Tallman wrote:
I'd like to change the values of attribute "href", whenever it appears
inside a "dao" element. From what I can tell, my template is correct,
however when ever I stick anything inside xsl:attribute (replace <!--
do stuff here -->, nothing happens during the transformation. Am I
missing something?

     <xsl:template match="@href[parent::dao]">
         <xsl:attribute name="href">
             <!-- do stuff here -->
         </xsl:attribute>
     </xsl:template>

I'm using XSLT 2.0, Saxon 6.5.5.

Thanks,
Nathan

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

.


--
Martin Holmes
University of Victoria Humanities Computing and Media Centre
(mholmes(_at_)uvic(_dot_)ca)

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