Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT 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 9th, 2006, 11:57 AM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default XSLT and JAVA

Hi All,

I am trying to pass some JAVA code in my XSLT and I am coming across a problem. The JAVA code requires a tag </SCRIPT> but the processer says it needs the start tag. IN HTML, it doesnt. How do I pass this along with out an error?

Code:
<style type="text/css">
                    <xsl:comment>.header {  }</xsl:comment>
                </style>
</SCRIPT>
<style type="text/css"><!--
#containerul, #containerul ul{
  text-align:left;
  margin:0; /* Removes browser default margins applied to the lists. */
  padding:0; /* Removes browser default padding applied to the lists. */
}

#containerul li{
  margin:0 0 0 30px; /* A left margin to indent the list items and give the menu a sense of structure. */
  padding:0; /* Removes browser default padding applied to the list items. */
  list-style-type:none; /* Removes the bullet point that usually goes next to each item in a list. */
}

#containerul .symbols{ /* Various styles to position the symbols next to the items in the menu. */
  float:left;
  width:12px;
  height:1em;
  background-position:0 50%;
  background-repeat:no-repeat;
}
--></style>
 
Old August 9th, 2006, 01:53 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

Nevermind...my error!

 
Old August 9th, 2006, 03:49 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Try escaping the markup as &lt;script&gt;

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old August 9th, 2006, 07:38 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

Michael, I tried that earlier to "fool" the processor, but it just printed "&lt;script&gt;".

I found the problem. I didnt need the </script> in the HTML. I copied the code from a JAVA site. It worked in HTML, so I thought I needed it. I deleted it and everything went threw.

I was able to generate a TOC using the generate-id() function along with an expandable tree menu with XSLT and JAVA.

Thanks again for the help






Similar Threads
Thread Thread Starter Forum Replies Last Post
Using XSLT and JAVA trinkets XSLT 4 April 4th, 2007 02:13 PM
XSLT 2.0 Transformation and JAVA markus2000 XML 2 June 22nd, 2006 04:34 AM
XSLT with Java Hind XSLT 1 May 24th, 2006 04:18 AM
Java & XSLT safin XSLT 0 September 8th, 2005 01:11 PM
binding java from xslt mountainbiker XSLT 2 February 19th, 2004 11:53 AM





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