<xsl:output> and 'name' attribute
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 12
- Joined: Tue Jun 14, 2005 6:40 pm
<xsl:output> and 'name' attribute
Hi,
This isn't much of an issue as it doesn't really cause any problem for me at the moment. Anyhow, whenever I tried to parse my xml files, Oxygen came up with an error saying I did not define the 'name' attribute of the 'output' element. Maybe I'm mistaking, but I though there was no such thing as a name attribute in the output element. However, as soon as I put a name attribue, the error was gone and the file parsed correctly.
What's the deal with that ?
This isn't much of an issue as it doesn't really cause any problem for me at the moment. Anyhow, whenever I tried to parse my xml files, Oxygen came up with an error saying I did not define the 'name' attribute of the 'output' element. Maybe I'm mistaking, but I though there was no such thing as a name attribute in the output element. However, as soon as I put a name attribue, the error was gone and the file parsed correctly.
What's the deal with that ?
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
If you are editing a XSLT stylesheet the <xsl:output> element where xsl is a prefix for the XSLT namespace http://www.w3.org/1999/XSL/Transform does not have an attribute name. If you are editing other type of XML document probably the schema of that document specifies that the name attribute is required. Please post small samples of the document and schema used to validate that document so we can get the same error.
Best regards,
Sorin
If you are editing a XSLT stylesheet the <xsl:output> element where xsl is a prefix for the XSLT namespace http://www.w3.org/1999/XSL/Transform does not have an attribute name. If you are editing other type of XML document probably the schema of that document specifies that the name attribute is required. Please post small samples of the document and schema used to validate that document so we can get the same error.
Best regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: <xsl:output> and 'name' attribute
Post by sorin_ristache »
Hello,
Best regards,
Sorin
What do you mean by parsing an XML file ? When you are editing an XSLT 2.0 stylesheet the xsl:output element is not necessary to have a name attribute. The following simple stylesheet is valid and applied on any XML document generates a file C:\temp\output.html that can be viewed in any Web browser no matter where is located the XML input document and the XSLT 2.0 stylesheet:coupes wrote:whenever I tried to parse my xml files, Oxygen came up with an error saying I did not define the 'name' attribute of the 'output' element.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output encoding="UTF-8"/>
<xsl:template match="/">
<xsl:result-document href="file:/C:/temp/output.html">
<html>
<head>
<title>Simple HTML document</title>
</head>
<body>
<p>The <b>xsl:output</b> element has no <b>name</b> attribute.</p>
</body>
</html>
</xsl:result-document>
</xsl:template>
</xsl:stylesheet>
Sorin
-
- Posts: 12
- Joined: Tue Jun 14, 2005 6:40 pm
I found out what the problem was...
I had a format attribute specified for some of my <xsl:result-document> elements. So I had to have the name attribute.
This also helped me solve another problem I had, where my html output was indented despite the indent="no" I had specified in my <xsl:output>. Turns out I hadn't specified a format attribute for this particular <xsl:result-document> element.
Thanks again sorin.

I had a format attribute specified for some of my <xsl:result-document> elements. So I had to have the name attribute.
This also helped me solve another problem I had, where my html output was indented despite the indent="no" I had specified in my <xsl:output>. Turns out I hadn't specified a format attribute for this particular <xsl:result-document> element.
Thanks again sorin.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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