webmasterbeta
New Member
new to xslt, but i though i understood it.
Take this exml for example :
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v3.5 NT (<!-- m --><a class="postlink" href="http://www.xmlspy.com">http://www.xmlspy.com</a><!-- m -->) by sis ICS-FORTH (ISL-ICS) -->
<!-- <!DOCTYPE lom SYSTEM "imsmd_v1p2p2.dtd"> -->
<lom xmlns="http://www.imsglobal.org/xsd/imsmd_v1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsmd_v1p2 imsmd_v1p2p2.xsd">
<general>
<title>
<langstring xml:lang="en"> Resumes and Interviews </langstring>
</title>
</lom>
---------------------------------------
Now, What I want to do is just print the title in between two <h1> </h1> brackets. eg. the xslt code that should do it imo
<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/lom/general/title">
<h1>
<xsl:value-of select="langstring"/>
</h1>
</xsl:template>
</xsl:stylesheet>
But it doesn't work.... where is my logic incorrect? can anyone help me?
Take this exml for example :
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v3.5 NT (<!-- m --><a class="postlink" href="http://www.xmlspy.com">http://www.xmlspy.com</a><!-- m -->) by sis ICS-FORTH (ISL-ICS) -->
<!-- <!DOCTYPE lom SYSTEM "imsmd_v1p2p2.dtd"> -->
<lom xmlns="http://www.imsglobal.org/xsd/imsmd_v1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsmd_v1p2 imsmd_v1p2p2.xsd">
<general>
<title>
<langstring xml:lang="en"> Resumes and Interviews </langstring>
</title>
</lom>
---------------------------------------
Now, What I want to do is just print the title in between two <h1> </h1> brackets. eg. the xslt code that should do it imo
<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/lom/general/title">
<h1>
<xsl:value-of select="langstring"/>
</h1>
</xsl:template>
</xsl:stylesheet>
But it doesn't work.... where is my logic incorrect? can anyone help me?