OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] user-defined text/background color in HTML output


Hi Ekaterina,

as far as I understood your original mail, you managed to get your
list of values parsed in the case of XSL-FO.

If not, you will have to write some XSLT to parse your pseudo-CSS...

Expect this to be a bit hard -- XSLT (at least, 1.0) is not really
made for string manipulation, and adding some error tolerance
may bloat your code even more.

Presumably, that parser would be based on first looking for a ";" ,
splitting that string off, then looking where the ":" within your
split-off string is. And then you would continue...

If you are looking for inspiration, in your local DocBook stylesheets
installation, take a look at lib/lib.xsl, and specifically the
template "pi-attribute". This template solves a similar issue, trying
to figure out constructs like 'attribute="value"'.

You can also take a look at my horrible old code to parse things
like 'attribute = value;' [1].

You would then have to add in a list of attributes to allow and a list
of color names to allow. And then match against those.

Hth,

Stefan.


[1] https://github.com/openSUSE/suse-xsl/blob/88451ccc3006b20900e0b28371ba8805362ed819/suse2013/fo/l10n.properties.xsl#L187


---                                                                    .
SUSE Linux GmbH. Geschäftsführer: Felix Imendörffer, Jane Smithard,
Graham Norton. HRB 21284 (AG Nürnberg).



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]