xsl-list
[Top] [All Lists]

Re: Matching XML elements for HTML output

2005-02-07 13:02:01
Tempore 20:50:02, die 02/07/2005 AD, hinc in xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit Rolando Isidoro <rli(_at_)uninova(_dot_)pt>:

to match the elements:

            <xsl:template match="dc:language"/>     WORKS

            <xsl:template match="datestamp"/>        FAILS

I’ve tried several solutions for the matching with the same result. Can
anyone tell me how can I get it to work?
Hi,

That's because the 'datestamp' element has a namespace too, viz. "http://www.openarchives.org/OAI/2.0/";

So to match that element, you''l need to declare that namespace in your xsl.
e.g.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:def="http://www.openarchives.org/OAI/2.0/";>

<xsl:template match="def:datestamp">
match here
</xsl:template>

</xsl:stylesheet>


regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
"In the land of the blind, the one-eyed man is king"

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