[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XHTML+XSL --> XSL

Subject: Re: XHTML+XSL --> XSL
From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx>
Date: Wed, 22 May 2002 12:18:26 +0200
Re:  XHTML+XSL --> XSL
Hello!

Antonio Fiol wrote:

*MY GOAL IS BEING ABLE TO use this source file instead* :
<!-- source2.html -->
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Some title with weird entities like&nbsp;&eacute;&icirc;</title>
</head>
<body>
      <xsl:value-of select="/doc/somenode/something" />
      <xsl:apply-templates select="/doc/otherthings" />
</body>
</html>

Well, it does not work, as the xsl:* tags are not recognized as being part of XHTML.

What you need is probably simplified stylesheet syntax, aka "Literal Result Element as Stylesheet", see http://www.w3.org/TR/xslt.html#result-element-stylesheet
This way xslt instructions can be embedded into any xml document.
You have just declare xsl namespace and provide xsl:version attribute.


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "DTD/xhtml1-transitional.dtd">
<html xsl:version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<head>
<title>Some title with weird entities like&nbsp;&eacute;&icirc;</title>
</head>
<body>
      <xsl:value-of select="/doc/somenode/something" />
      <xsl:apply-templates select="/doc/otherthings" />
</body>
</html>

--
Oleg Tkachenko
Multiconn International, Israel


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.