Could Author mode find and use CSS in an attribute?
Are you missing a feature? Request its implementation here.
-
- Posts: 190
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Could Author mode find and use CSS in an attribute?
Post by martindholmes »
Hi there,
Would it be possible to have a configuration in Author Mode whereby, in addition to the supplied CSS stylesheet, the renderer looked for CSS rules in an attribute on XML elements? I'm thinking particularly of the TEI @style attribute, whose contents are CSS. It would be nice if this:
showed up as centred in Author Mode because the document type configuration allowed us to specify that @style is a source for CSS rules. It's possible to do this to a certain extent with e.g.:
in the stylesheet, but obviously this gets messy and complicated when multiple rules appear in a single attribute, as is commonly the case.
I'm imagining a configuration in the Document Type dialog box where an XPath selecting one or more attributes could be specified (//*/@style, or */@style if modelled on an xsl:templates/@match attribute). The renderer would then apply rules found in these contexts after applying the general stylesheet rules.
Cheers,
Martin
Would it be possible to have a configuration in Author Mode whereby, in addition to the supplied CSS stylesheet, the renderer looked for CSS rules in an attribute on XML elements? I'm thinking particularly of the TEI @style attribute, whose contents are CSS. It would be nice if this:
Code: Select all
<p style="text-align: center;">...</p>
Code: Select all
*[style='text-align: center;']{text-align: center;}
I'm imagining a configuration in the Document Type dialog box where an XPath selecting one or more attributes could be specified (//*/@style, or */@style if modelled on an xsl:templates/@match attribute). The renderer would then apply rules found in these contexts after applying the general stylesheet rules.
Cheers,
Martin
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Could Author mode find and use CSS in an attribute?
Hi Martin,
We have a special Oxygen CSS property called oxy_styles and it can be used in the CSS something like:
https://www.oxygenxml.com/doc/versions/ ... perty.html
Maybe the same selector should be added to the default TEI CSSs which come in the TEI framework for Oxygen.
Regards,
Radu
We have a special Oxygen CSS property called oxy_styles and it can be used in the CSS something like:
Code: Select all
*[style]{
-oxy-style:attr(style);
}
Maybe the same selector should be added to the default TEI CSSs which come in the TEI framework for Oxygen.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 190
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Could Author mode find and use CSS in an attribute?
Post by martindholmes »
Thanks Radu, that's exactly what I need! I must have missed it in the documentation.
I don't know if it belongs in the TEI framework or not; generally @style is used for describing the appearance of an original text rather than styling something for rendering purposes, and it would only be a subset of projects that would want to see those styles in Author mode.
Cheers,
Martin
I don't know if it belongs in the TEI framework or not; generally @style is used for describing the appearance of an original text rather than styling something for rendering purposes, and it would only be a subset of projects that would want to see those styles in Author mode.
Cheers,
Martin
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Could Author mode find and use CSS in an attribute?
Hi Martin,
Glad this helps you, thanks for the clarification with regard to the @style attribute.
Regards,
Radu
Glad this helps you, thanks for the clarification with regard to the @style attribute.
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