Forum How do I...?

Getting an attribute value into a string-set

Bjarne
hi,

I need to get an attribute value into a string-set so I then can use it in a footer? What's wrong with the syntax ?

Here is what I'm trying:

In the source xml:
...
<body title="00">
...

In the CSS:
------------------------------------------------------------------------
@page {
margin: 27mm 16mm 27mm 16mm;
size: a4 portrait;
border-bottom: medium solid black;
@bottom {
content: string(chapternr) " - " counter(page);
}
}
....

body[title] {string-set: chapternr content(attr(title)) }

--------------------------------------------------------------------------

Only the "" - " counter(page)" part is shown in the pdf - why not also the 'chapternr' ?

///Bjarne
JohnClarke
Hi Bjarne,

body[title] {string-set: chapternr content(attr(title)) }


Does this work?
body {string-set: chapternr attr(title) }


I think that content refers to the text between two tags. For example, <div id="title">This is the content</div>.
-John

John Clarke
Cornerstone Systems Northwest Inc.

Bjarne
Hi John,

Yes, Thanks!

That was the syntax I needed!

///Bjarne