0

I want to add code shown below in my XSL but it is not displaying properly when I generate it in HTML.

<head>
  <script src='https://js.dmtry.com/channel.js#gid:3299;advid:899;pid:389827'> </script>
</head>

The script tag is not closing properly when generated in HTML.

3
  • 1
    Which XSLT processor do you use, which input do you have, which output do you get, which output do you want? Post small but complete samples allowing us to reproduce the problem. Commented Jul 15, 2013 at 9:52
  • i want to generate a simple html page using XSL but due to script tag it is not displaying properly. it showing blank page. when i remove script tag it is displaying properly. I dont know about XSLT processor but I am using Microsoft Visual Studio 2008 Commented Jul 15, 2013 at 9:55
  • Does that happen with any type of script src? Or only when you reference https://js.dmtry.com/channel.js#gid:3299;advid:899;pid:389827? I don't see anything wrong with your posted script element syntax, neither in terms of HTML nor in terms of XSLT. What happens when you write a static HTML document with <script src='https://js.dmtry.com/channel.js#gid:3299;advid:899;pid:389827'> </script>, does the browser load and display it as you want? Commented Jul 15, 2013 at 10:58

1 Answer 1

1

Perhaps you are saying you are getting this as the output:

<script src="https://js.dmtry.com/channel.js#gid:3299;advid:899;pid:389827"/>

When, actually, you are expecting this:

<script src="https://js.dmtry.com/channel.js#gid:3299;advid:899;pid:389827"></script>

If so, try specifying the output method in your XSLT as "html", like so:

<xsl:output method="html" />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.