W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: [css-gcpm] String-set issues

From: Håkon Wium Lie <howcome@opera.com>
Date: Mon, 24 Nov 2014 22:05:15 +0100
Message-ID: <21619.40331.544006.961812@opera.com>
To: Liam R E Quin <liam@w3.org>
Cc: Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>, Dave Cramer <Dave.Cramer@hbgusa.com>
Liam R E Quin wrote:

 > > I've been giving some attention named strings in the latest GCPM
 > > draft [1]. I have some issues and comments. I'll start with the
 > > things I think are problems, and then I'll propose how I'd like
 > > to see it improve.
 > 
 > Brad, agree 100% that string-set is sucky. There are several
 > problems I see, one of which is that we're supposed to be
 > declarative and assignment sounds awfully procedural

It's slightly more subtle. 'string-set' isn't procedural, like in
"assign this value to that variable". Rather, it declares that certain
elements (those selected) influence a certain named string. Later, the
named string can be referred to, but each names string can take on
several values depending on where the assignment took place.

 > but a bigger one is that (as you point out) strings are not adequate.

Named strings probably covers 90% of all running headers, but, indeed,
there are cases when you need to move elements. Have you seen running
elements?:

   https://books.spec.whatwg.org/#running-elements

 > There's a proposal in one of the GCPM drafts to be able to copy an
 > element (right now you can only move it into the flow of another
 > element using GCPM, which means you can end up with extra duplicate
 > elements all over the place).

Yes. 

  https://books.spec.whatwg.org/#placement-policy

 > It's so common to need a mix of fixed strings, formatted strings
 > and element content that the solution should make that easy -- e.g.
 > consider page numbers like
 >
 >   003-14 14.2.1 The Section Title Here            [ short form of current lemma title ]
 >
 > where the chapter number is 2 digits, there's a fixed hyphen before
 > the page number, and the running header contains MathML (or
 > Japanese Ruby)...

I'm not sure I understand what you mean with "two digits" above, but
here's a simple document that uses named strings, counters, and named
elements (with mathml) to achieve something similar to your sketch. 

  http://www.wiumlie.no/2014/tests/books/running-strings-running-elements.html
  http://www.wiumlie.no/2014/tests/books/running-strings-running-elements-pr.pdf

The PDF is produced by Prince.

 > Basing content flows on the spec that defines content flows
 > (regions) seems on the face of it very sensible and I agree we
 > should explore it.

I can never be against explorations. But it also seems wise to try out
existing specs and implementations before heading out anew.

Cheers,

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Monday, 24 November 2014 21:05:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC