html elements generated with namespaces
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 1
- Joined: Wed Jun 20, 2007 6:05 pm
- Location: Montpellier, France
html elements generated with namespaces
Post by fzilbermann »
Hello,
First sorry if it's a silly question and the answer obvious, but I looked for an answer and didn't find any so I dare to ask here. I use the last version of oXygen (8.2) and Saxon8B.
I use some XML (coming from Open Office but I don't think it matters a lot) and transform them using some xslt, nothing new huhu. It seems, and I don't know why, the top element of the <xsl:stylesheet> is generated with the namespaces of the <xsl:stylesheet> itself. so it gives something like :
for example ...
But when I put transforming instructions for the <head>...</head> part in another file, so another <xsl:stylesheet>, the top element for this became <head> and it's now generated as <head xmlns="">...</head>, which cause, for me, a bug in FF (not IE as far as I saw) displaying all inside the <head> tag as text instead of "interpreting" it.
Well that's it, I hope I was clear enough, thanks for any hints on how getting around this.
Fred
First sorry if it's a silly question and the answer obvious, but I looked for an answer and didn't find any so I dare to ask here. I use the last version of oXygen (8.2) and Saxon8B.
I use some XML (coming from Open Office but I don't think it matters a lot) and transform them using some xslt, nothing new huhu. It seems, and I don't know why, the top element of the <xsl:stylesheet> is generated with the namespaces of the <xsl:stylesheet> itself. so it gives something like :
Code: Select all
<html xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:math="http://www.w3.org/1998/Math/MathML/"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"><
But when I put transforming instructions for the <head>...</head> part in another file, so another <xsl:stylesheet>, the top element for this became <head> and it's now generated as <head xmlns="">...</head>, which cause, for me, a bug in FF (not IE as far as I saw) displaying all inside the <head> tag as text instead of "interpreting" it.
Well that's it, I hope I was clear enough, thanks for any hints on how getting around this.
Fred
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
I think you want in the result document only
You have to add the following attribute to the xsl:stylesheet element of the XSLT stylesheet:
Regards,
Sorin
I think you want in the result document only
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
...
</head>
...
</html>
Code: Select all
exclude-result-prefixes="draw xlink style fo math office dc meta text table"
Regards,
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