Re: [pollen] Semantic markup in generated X-expression?

2019-04-12 Thread Matthew Butterick
OK, then suppose you store the attributes in the X-expressions for the purposes of your internal Pollen processing. You can always strip out those private attributes before the `doc` is injected into the HTML template. Does that work? You're right that the X-expression closely models HTML

Re: [pollen] Semantic markup in generated X-expression?

2019-04-12 Thread dsockwell
> > You could preserve the semantic information inside a `class` attribute, or > custom attribute. These would also be reachable through CSS selectors, if > you're into that. > True, and I considered that. (Something like '(define book (default-tag-function 'li #:class "book"))` would do

Re: [pollen] Semantic markup in generated X-expression?

2019-04-12 Thread Matthew Butterick
You could preserve the semantic information inside a `class` attribute, or custom attribute. These would also be reachable through CSS selectors, if you're into that. > On Apr 12, 2019, at 7:51 AM, Daniel Sockwell wrote: > > In general, my intuition is that the semantics should be preserved

[pollen] Semantic markup in generated X-expression?

2019-04-12 Thread Daniel Sockwell
After reading through the Pollen documentation, I'm extremely sold on the power of semantic markup. But I'm a bit confused about whether to preserve semantics in the generated X-expressions and, if so, how we would do so. Consider the following toy example: ``` #lang pollen ◊(books (book