yeah, I noticed I'd put in the @ in the name 4 seconds after I sent,
so I sent a note saying remove the @.
Cheers,
Bryan Rasmussen
On Fri, Apr 11, 2008 at 12:21 AM, Mark Carlson
<carlsonm(_at_)u(_dot_)washington(_dot_)edu> wrote:
Almost- Here's how the @attrib2 template should appear:
<xsl:template match="@attrib2">
<xsl:attribute name="attrib2">0</xsl:attribute>
</xsl:template>
Karol Krenski wrote:
Thanks a lot for all the answers and hints. I will surely inspect them
carefuly. The list seems so suportive and friendly that I can't exclude
the possibility of coming back with another questions ;)
Also thanks for pointing me to dpawson FAQ. It seems interesting.
Karol
think it should be like this you're looking for.
<xsl:template match="*">
<xsl:copy><xsl:apply-templates
select="@*"/><xsl:apply-templates/></xsl:copy>
</xsl:template>
<xsl:template match="@*">
<xsl:copy/>
</xsl:template>
<xsl:template match="@attrib2">
<xsl:attribute name="@attrib2">0</xsl:attribute>
</xsl:template>
cheers,
Bryan Rasmussen
On Thu, Apr 10, 2008 at 10:40 AM, Karol Krenski
<mimooh(_at_)inf(_dot_)sgsp(_dot_)edu(_dot_)pl>
wrote:
Hi list,
I am a novice to XSLT, learned mainly form online tutorials. This
XSLT
thing is killing me. Can't figure out how to transform my doc.xml:
<?xml version="1.0" encoding="UTF-8"?>
<foo>
<bar>
<date attrib1='aaaaaaa' attrib2='bbbbbb'>25-02-08</date>
^
<name attrib3='null'>AAAAAAAAAAAAAAA</name>
</bar>
<bar>
<date attrib1='cccccc' attrib2='dddddd'>26-02-08</date>
^
<name attrib4='null'>BBBBBBBBBBBBBBB</name>
</bar>
</foo>
into
<?xml version="1.0" encoding="UTF-8"?>
<foo>
<bar>
<date attrib1='aaaaaaa' attrib2='0'>25-02-08</date>
^
<name attrib3='null'>AAAAAAAAAAAAAAA</name>
</bar>
<bar>
<date attrib1='cccccc' attrib2='0'>26-02-08</date>
^
<name attrib4='null'>BBBBBBBBBBBBBBB</name>
</bar>
</foo>
Can somebody please suggest the correct stylesheet?
I am blindly typing mainly 'copy' or 'copy-of' in my templates and
the
output generation mechanics make little sense to me. The docs,
comparing
to other programing documentation seems hard to understand. Could
somebody suggest good docs, please?
Regards,
Karol
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--