Page 1 of 1
Oxygen CSS extensions attr(), foldable
Posted: Wed Jan 30, 2008 6:01 pm
by Uli
Hello,
if i want to use the Oxygen CSS extension attr() and foldable my attributes and elements have to be lower case.
Is that correct and if so what is the reason?
Regards, Uli
Re: Oxygen CSS extensions attr(), foldable
Posted: Wed Jan 30, 2008 6:37 pm
by sorin_ristache
Hello,
The element names and the attribute names used in the CSS stylesheet must be the same as in the XML document. The XML element and attribute names
are case sensitive in CSS and XML (read the first rule of the section
Characters and case).
Regards,
Sorin
Re: Oxygen CSS extensions attr(), foldable
Posted: Thu Jan 31, 2008 10:12 am
by Uli
Sorry, but it doesn't work.
Have a look at the two little examples.
regards, Uli
---- Working -----
XML:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="works.css"?>
<Test>
<element nr="1">
<name>E1</name>
<sub>S1</sub></element>
<element nr="2">
<name>E2</name>
<sub>S2</sub></element>
<element nr="3">
<name>E3</name>
<sub>S3</sub></element>
</Test>
CSS:
Code: Select all
Test {
display:block;
margin:1cm;
}
element:before {
content:"Nr: "attr(nr);
}
element
{
display:block;
foldable:true;
not-foldable-child: name;
margin:1cm;
border-color:black;
border-style:solid;
border-width:2px;
}
name {
display:inline;
}
sub {
display:block;
}
-----------------------
---- Not Working -----
XML:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="dont_works.css"?>
<Test>
<Element Nr="1">
<Name>E1</Name>
<sub>S1</sub></Element>
<Element Nr="2">
<Name>E2</Name>
<sub>S2</sub></Element>
<Element Nr="3">
<Name>E3</Name>
<sub>S3</sub></Element>
</Test>
CSS:
Code: Select all
Test {
display:block;
margin:1cm;
}
Element:before {
content:"Nr: "attr(Nr);
}
Element
{
display:block;
foldable:true;
not-foldable-child: Name;
margin:1cm;
border-color:black;
border-style:solid;
border-width:2px;
}
Name {
display:inline;
}
sub {
display:block;
}
-------------------------
Re: Oxygen CSS extensions attr(), foldable
Posted: Thu Jan 31, 2008 11:29 am
by sorin_ristache
Thank you for the example. We will fix this bug in the next version of oXygen. Please use only lowercase attribute names until we release the next version.
Regards,
Sorin
Re: Oxygen CSS extensions attr(), foldable
Posted: Thu Jan 31, 2008 1:34 pm
by Uli
Additionally, the foldable feature only works if i
have a not-foldable-child property with a valid
child element name.
Regards, Uli
Re: Oxygen CSS extensions attr(), foldable
Posted: Thu Jan 31, 2008 1:57 pm
by sorin_ristache
I cannot reproduce that. Can you post an example?
Regards,
Sorin
Re: Oxygen CSS extensions attr(), foldable
Posted: Thu Jan 31, 2008 2:36 pm
by Uli
Folding doesn't work if you remove the not-foldable-child line
or if you change "name" to "zulu" for example.
XML:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="works.css"?>
<Test>
<element nr="1">
<name>E1</name>
<sub>S1</sub></element>
<element nr="2">
<name>E2</name>
<sub>S2</sub></element>
<element nr="3">
<name>E3</name>
<sub>S3</sub></element>
</Test>
CSS:
Code: Select all
Test {
display:block;
margin:1cm;
}
element:before {
content:"Nr: "attr(nr);
}
element
{
display:block;
foldable:true;
not-foldable-child: name;
margin:1cm;
border-color:black;
border-style:solid;
border-width:2px;
}
name {
display:inline;
}
sub {
display:block;
}
Re: Oxygen CSS extensions attr(), foldable
Posted: Thu Jan 31, 2008 3:24 pm
by sorin_ristache
I am sorry, I could not reproduce it because I tried with the current development version in which some bugs that existed in version 9.1 are already fixed. You are right, the bug exists in version 9.1 but it is already fixed in the current development version. If you need a patch that fixes this foldable problem please
let us know.
Regards,
Sorin