"specific" attribute CSS selector not recognized
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 240
- Joined: Wed Jun 17, 2015 12:46 pm
"specific" attribute CSS selector not recognized
Hello,
We are using Oxygen component 22.1 version.
It seems that the "specific" attribute is not recognized / is ignored by CSS selectors.
Xml example:
Css example:
displays the green border => OK
do not display the green border => KO
Is there something special with the "specific" attribute ?
Regards,
Johann
We are using Oxygen component 22.1 version.
It seems that the "specific" attribute is not recognized / is ignored by CSS selectors.
Xml example:
Code: Select all
<toolRef specific="test" otherAttribute="test2" />
Code: Select all
toolRef[otherAttribute] {
border: 1px solid green;
}
Code: Select all
toolRef[specific] {
border: 1px solid green;
}
Is there something special with the "specific" attribute ?
Regards,
Johann
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "specific" attribute CSS selector not recognized
Hi Johann,
Testing with Oxygen 23.1 desktop this seems to work for me (creating a small XML and a small CSS based in your sample), and I do not remember having this problem in any past release. Maybe you have another CSS selector interfering with this.
Regards,
Radu
Testing with Oxygen 23.1 desktop this seems to work for me (creating a small XML and a small CSS based in your sample), and I do not remember having this problem in any past release. Maybe you have another CSS selector interfering with this.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 240
- Joined: Wed Jun 17, 2015 12:46 pm
Re: "specific" attribute CSS selector not recognized
Hi Radu,
The scenario I described was not good.
CSS:
This XML:
appears with a red background => OK
This XML:
appears with a red background too => NOK, blue background is expected
For other attributes, we get the correct behavior.
It has been tested on Oxygen Editor 22.0 / 23.1
Regards,
Johann
The scenario I described was not good.
CSS:
Code: Select all
toolRef {
background-color: blue;
}
toolRef[specific] {
background-color: red;
}
Code: Select all
<toolRef specific="test" />
This XML:
Code: Select all
<toolRef/>
For other attributes, we get the correct behavior.
It has been tested on Oxygen Editor 22.0 / 23.1
Regards,
Johann
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "specific" attribute CSS selector not recognized
Hi Johann,
I cannot reproduce the problem on my side. In my opinion you have a DTD/Schema associated to the XML document and that schema defines a default value for the "specific" attribute, the CSS matches that default attribute value as if it is specified in the XML document.
Regards,
Radu
I cannot reproduce the problem on my side. In my opinion you have a DTD/Schema associated to the XML document and that schema defines a default value for the "specific" attribute, the CSS matches that default attribute value as if it is specified in the XML document.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 240
- Joined: Wed Jun 17, 2015 12:46 pm
Re: "specific" attribute CSS selector not recognized
Hello Radu,
You are right, the behavior is due to the associated schema.
When I remove the schema, everything is OK.
In the schema, specific attribute is not mandatory but it has a default value:
Despite everything, we agree that this is not normal? CSS should reflect the actual XML and not default values described in schema?
Regards,
Johann
You are right, the behavior is due to the associated schema.
When I remove the schema, everything is OK.
In the schema, specific attribute is not mandatory but it has a default value:
Code: Select all
<xs:attribute default="1" name="specific" type="yesOrNoAttType"/>
Regards,
Johann
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "specific" attribute CSS selector not recognized
Hi Johann,
We do not regard this as a bug. An implementer of CSS rule matching may choose to use external schemas to take into account default attribute values defined in an associated schema: https://www.w3.org/TR/selectors-3/#def-values
For example for the DITA XML standard, all the elements are matched using their @class attribute values which have defaults defined in the DTDs or schemas.
I'm afraid we do not have a setting to control this for DTD and XML Schema based XML documents.
Regards,
Radu
We do not regard this as a bug. An implementer of CSS rule matching may choose to use external schemas to take into account default attribute values defined in an associated schema: https://www.w3.org/TR/selectors-3/#def-values
For example for the DITA XML standard, all the elements are matched using their @class attribute values which have defaults defined in the DTDs or schemas.
I'm afraid we do not have a setting to control this for DTD and XML Schema based XML documents.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
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