Oxygen CSS extensions attr(), foldable

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Uli
Posts: 11
Joined: Wed Jan 30, 2008 5:50 pm

Oxygen CSS extensions attr(), foldable

Post 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
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Oxygen CSS extensions attr(), foldable

Post 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
Uli
Posts: 11
Joined: Wed Jan 30, 2008 5:50 pm

Re: Oxygen CSS extensions attr(), foldable

Post 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;
}
-------------------------
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Oxygen CSS extensions attr(), foldable

Post 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
Uli
Posts: 11
Joined: Wed Jan 30, 2008 5:50 pm

Re: Oxygen CSS extensions attr(), foldable

Post by Uli »

Additionally, the foldable feature only works if i
have a not-foldable-child property with a valid
child element name.

Regards, Uli
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Oxygen CSS extensions attr(), foldable

Post by sorin_ristache »

I cannot reproduce that. Can you post an example?


Regards,
Sorin
Uli
Posts: 11
Joined: Wed Jan 30, 2008 5:50 pm

Re: Oxygen CSS extensions attr(), foldable

Post 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;
}
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Oxygen CSS extensions attr(), foldable

Post 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
Post Reply