Why the value of the tag isn’t outputted

I am new in XSLT and I don’t understand the basic idea of templates.
I am doing an experiment to see if the output is what I expect. Unfortunately not. This are the files in transformation:

The XML:

<?xml version="1.0" encoding="UTF-8"?>

        <artist>Bob Dylan</artist>
        <title>Hide your heart</title>
        <artist>Bonnie Tyler</artist>
        <company>CBS Records</company>

And this is the XSLT:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="text"/>
    <xsl:template match="/">
        <xsl:apply-templates select="//continent"/>
    <xsl:template match="//continent">
        <xsl:value-of select="continent"/>

The output is empty sheet. I expect the value of the continent tag to be printed, namely America. Please shed some light on this matter. Thank tou.

Source: xml

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.