Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 10th, 2004, 11:34 PM
Registered User
 
Join Date: Aug 2004
Location: islamabad, , .
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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 05:25 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.