Adding a CSS stylesheet to xml
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 10
- Joined: Mon May 29, 2017 7:19 pm
Adding a CSS stylesheet to xml
I am very confused about using a css stylesheet to alter the formatting of xml in a browser. I have an xslt stylesheet, and that works fine, but the css doesn't appear to make any difference.
At the top I have <?xml-stylesheet href="text.css" type="text/css"?>. Is this wrong? The css file is called "text.css".
I know there have been posts on this before, but I've read them and can't make sense of them.
At the top I have <?xml-stylesheet href="text.css" type="text/css"?>. Is this wrong? The css file is called "text.css".
I know there have been posts on this before, but I've read them and can't make sense of them.
-
- Posts: 9424
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Adding a CSS stylesheet to xml
Hi,
If you open an XML document with an associated CSS in a web browser, the CSS selectors must match those particular XML elements and style them. So you cannot have the CSS match HTML element names, they need to match the XML element names as you have not converted the XML to HTML.
Regards,
Radu
If you open an XML document with an associated CSS in a web browser, the CSS selectors must match those particular XML elements and style them. So you cannot have the CSS match HTML element names, they need to match the XML element names as you have not converted the XML to HTML.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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