Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 10th, 2004, 11:34 PM
Registered User
 
Join Date: Aug 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to insert <META> Tag using XSLT on client

Dear Reader

I am using the following procedure to insert <META> tag in .html. But I cannnot see the <meta> tag in VIEW -> SOURCE. Please help me how can I XSLT on client, to insert <META>. so I can see <META> tag in VIEW -> SOURCE?

Please help me in this regard. I will be thankful to you for this kindness. Thanking you in anticipation.
------------- Problem starts here -------------
<!- example.xml -->

<?xml version="1.0" encoding="ISO-8859-1"?>
<tagMeta>
  <metaKey>
    <keyContent>
        How to dynamically insert META Tag in an HTML document
    <keyContent>
  <metaKey>
<tagMeta>


<!- example.xsl -->

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
    <head>
        <meta name="keywords" content="<xsl:value-of select="/metaKey/keycontent"/>
    </head>
  <body>

  </body>
  </html>
</xsl:template>
</xsl:stylesheet>

<!- example.html -->

<html>
<body>
<script type="text/javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("example.xml")

// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("example.xsl")

// Transform
document.write(xml.transformNode(xsl))
</script>

</body>

reply soon please






Similar Threads
Thread Thread Starter Forum Replies Last Post
<meta> tag is appearing in xml file saurabh_inblore XSLT 2 April 24th, 2006 11:56 PM
How to insert <META> tag using XSLT on client? Abdul Hameed XSLT 2 September 19th, 2004 12:24 PM
How to insert <META> tagg in .HTML whn is loaded? Abdul Hameed HTML Code Clinic 3 August 12th, 2004 04:49 AM
How to dynamically insert <META> tag in .HTML? Abdul Hameed Javascript 1 August 11th, 2004 10:03 AM
how to dynamically insert <META> tag in .html Abdul Hameed XSLT 1 August 10th, 2004 03:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.