CSS3 namespaces not working as described in documentation
Oxygen general issues.
-
- Posts: 5
- Joined: Sun Jan 20, 2008 2:10 am
CSS3 namespaces not working as described in documentation
I'm having some issues getting CSS3 namespace selectors working in Author mode.
These are all equivalent and work as described in "Supported Features from CSS Level 3":
@namespace oxy 'http://www.oxygenxml.com/extensions/author';
@namespace oxy "http://www.oxygenxml.com/extensions/author";
@namespace oxy url(http://www.oxygenxml.com/extensions/author);
@namespace oxy url('http://www.oxygenxml.com/extensions/author');
@namespace oxy url("http://www.oxygenxml.com/extensions/author");
These do not work:
@namespace oxy 'http://www.oxygenxml.com/extensions/authorx';
@namespace oasis 'http://www.oasis-open.org/specs/tm9901.html';
Why does the URL matter? I was under the impression that it simply had to be a unique string. Are other namespaces even supported?
How do I know what the correct URL is for, say, the 'oasis' namespace?
For now, I seem to be able to get along with the "*|element" selector, but I have not been able to get a specific namespace to work, for instance: "oasis|table". Is this supported (aside from the 'oxy' namespace)?
These are all equivalent and work as described in "Supported Features from CSS Level 3":
@namespace oxy 'http://www.oxygenxml.com/extensions/author';
@namespace oxy "http://www.oxygenxml.com/extensions/author";
@namespace oxy url(http://www.oxygenxml.com/extensions/author);
@namespace oxy url('http://www.oxygenxml.com/extensions/author');
@namespace oxy url("http://www.oxygenxml.com/extensions/author");
These do not work:
@namespace oxy 'http://www.oxygenxml.com/extensions/authorx';
@namespace oasis 'http://www.oasis-open.org/specs/tm9901.html';
Why does the URL matter? I was under the impression that it simply had to be a unique string. Are other namespaces even supported?
How do I know what the correct URL is for, say, the 'oasis' namespace?
For now, I seem to be able to get along with the "*|element" selector, but I have not been able to get a specific namespace to work, for instance: "oasis|table". Is this supported (aside from the 'oxy' namespace)?
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Hello,
Please post the complete samples (XML and CSS) showing the problem. In the following you may find a working sample.
I used the Oasis namespace to define a table layout in the CSS:
The XML was:
The first "table" element was rendered as a table, while the second was displayed as a block, because the second "table" element was not in the Oasis namespace.
I hope this helps,
Regards,
Dan
Please post the complete samples (XML and CSS) showing the problem. In the following you may find a working sample.
I used the Oasis namespace to define a table layout in the CSS:
Code: Select all
@namespace oasis 'http://www.oasis-open.org/specs/tm9901.html';
oasis|article{
display:block;
}
oasis|table{
display:table;
border:1px solid blue;
}
oasis|tr{
display:table-row;
}
oasis|td{
display:table-cell;
border:1px solid blue;
padding:20px;
}
*|td{
background-color:yellow;
}
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="test.css"?>
<article xmlns="http://www.oasis-open.org/specs/tm9901.html">
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>2</td>
<td>1</td>
<td>3</td>
</tr>
</table>
<!-- Table that is NOT in the Oasis namespace. -->
<table xmlns="">
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>2</td>
<td>1</td>
<td>3</td>
</tr>
</table>
</article>
I hope this helps,
Regards,
Dan
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