Problem with <head><title>
Having trouble installing Oxygen? Got a bug to report? Post it all here.
Problem with <head><title>
Post by Sandrine »
Hello,
Can you tell me why, when I write this in the beginning of my xsl, Oxygen successful in transform my xml but the xhtml page is empty :
If I write this, Oxygen can display the result but not the title :
Otherwise, if I write this, Oxygen can display the result and the title :
Thank you for your help.
Sandrine
Can you tell me why, when I write this in the beginning of my xsl, Oxygen successful in transform my xml but the xhtml page is empty :
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/root">
<html>
<head>
<title>MyTitle</title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="book/author">
<h2>Author</h2>
...
Code: Select all
...
<xsl:template match="/root">
<html>
<title>MyTitle</title>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="book/author">
<h2>Author</h2>
...
Code: Select all
...
<xsl:template match="/root">
<html>
<h1>MyTitle</h1>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="book/author">
<h2>Author</h2>
...
Sandrine
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Sandrine,
Please note that the view you are refering to is for XHTML. When you put method="html" the XSLT processor (Xalan) will generate a meta element without a closing tag which makes the result not well formed, thus the XHTML view fails to render it. You can configure the transformation to save the result to a file and then activate the "open in browser" option to see it in the default browser.
The title element should be present in html/head only and is not considered part of the flow of text. It should be displayed, for example as the page header or window title. So you may try something like:
Best Regards,
George
Please note that the view you are refering to is for XHTML. When you put method="html" the XSLT processor (Xalan) will generate a meta element without a closing tag which makes the result not well formed, thus the XHTML view fails to render it. You can configure the transformation to save the result to a file and then activate the "open in browser" option to see it in the default browser.
The title element should be present in html/head only and is not considered part of the flow of text. It should be displayed, for example as the page header or window title. So you may try something like:
Code: Select all
<html>
<head>
<title>My title</title>
</head>
<body>
<h1> My title </h1>
</body>
</html>
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service