Displaying processing instructions inline
Oxygen general issues.
-
- Posts: 176
- Joined: Wed Apr 29, 2009 4:55 pm
Displaying processing instructions inline
Hello,
I have set in customized Docbook css style like this
but it is still displayed as block, even after restarting of Oxygen. Is it necessary to set something else or it is not possible?
Jan
I have set in customized Docbook css style like this
Code: Select all
oxy|processing-instruction {
display: inline;
}
Jan
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Displaying processing instructions inline
Post by sorin_ristache »
Hello,
You have to override the default style:
Regards,
Sorin
You have to override the default style:
Code: Select all
oxy|processing-instruction {
display: inline !important;
}
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Displaying processing instructions inline
Post by sorin_ristache »
Yes it works. Did you enable displaying processing instructions in Preferences -> Editor -> Pages -> Author?
Regards,
Sorin
Regards,
Sorin
-
- Posts: 176
- Joined: Wed Apr 29, 2009 4:55 pm
Re: Displaying processing instructions inline
I've checked your code on another PC with the same result as on mine (with processing instruction switched on). If the following code is used
Year and holder are on separate lines. If PI is replaced with any text, both elements are on the same line.
Code: Select all
<copyright>
<year><?dbtimestamp format="Y"?></year>
<holder>MyCompany</holder>
</copyright>
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Displaying processing instructions inline
Post by sorin_ristache »
Try the following XML file:
and create a file pi-inline.css in the same folder as the above XML file with the content:
When you edit the XML file in Author mode you see dbtimestamp format="Y" and MyCompany on the same line. If you replace inline with block in the CSS you see dbtimestamp format="Y" and MyCompany on two different lines.
Regards,
Sorin
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="pi-inline.css"?>
<copyright>
<year><?dbtimestamp format="Y"?></year>
<holder>MyCompany</holder>
</copyright>
Code: Select all
@namespace oxy url('http://www.oxygenxml.com/extensions/author');
oxy|processing-instruction {
display:inline !important;
}
Regards,
Sorin
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Displaying processing instructions inline
It would be cool if you could select the PI based on its name so you could style different pis in different ways:
Code: Select all
oxy|processing-instruction['sbr']{
display: inline !important;
}
oxy|processing-instruction{
display: block !important;
}
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Displaying processing instructions inline
Yes, I was thinking of the PITarget (that part that's emitted by the name attr in the xsl:processing-instruction). Then I could display <?sbr?> inline and most others as block. But if you do that, won't people then want to match based on the text content of the PI too? I suppose so, but css is too anemic for that kind of matching. What I really want is to be able to xslt-like things in css, but that's impossible:
I guess let me think more what I really want/need to do. Perhaps I can get by just making them all inline.
David
Code: Select all
oxy|processing-instruction[contains(.,'foo')]
David
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Displaying processing instructions inline
Hi David,
Oxygen 14.1 was just released and it added the ability to match from the CSS processing instructions either by target or by certain pseudo attributes which are set.
For example you can match this PI:
with CSS selectors like:
or
or
or
Regards,
Radu
Oxygen 14.1 was just released and it added the ability to match from the CSS processing instructions either by target or by certain pseudo attributes which are set.
For example you can match this PI:
Code: Select all
<?t1 data="b"?>
Code: Select all
oxy|processing-instruction[t1]
Code: Select all
oxy|processing-instruction[data]
Code: Select all
oxy|processing-instruction[data=="b"]
Code: Select all
oxy|processing-instruction[t1][data=="b"]
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