- From: Imsieke, Gerrit, le-tex <gerrit.imsieke@le-tex.de>
- Date: Thu, 7 Sep 2017 16:49:07 +0200
- To: xproc-dev@w3.org
I think it’s totally acceptable to specify it as an XPath expression like in @select. It doesn’t have to be a literal map constructor each time though. We should be able to pass a variable to it. Example: <p:variable name="csv-props" as="map(xs:string, xs:string)" select="map { 'content-type': 'text/csv' }"/> <p:inline document-properties="$csv-props">a;b;c d;e;f</p:inline> Gerrit On 07.09.2017 15:56, Norman Walsh wrote: > Consider this pipeline fragment: > > <p:inline document-properties="{ > map {{ 'content-type': 'image/svg+xml', > 'color-space': 'cmyk' > }} }”> > <svg:svg>…</svg:svg> > </p:inline> > > The document-properties value must be a map. The only representation > of a map in a string is a map constructor. Map constructors use curly > braces. The only way to get an expression in a string is with an AVT. > And AVTs also use braces. > > Given that document properties *has* to be a map, I wonder if we > should assert, like we do with @select on p:with-option, that it’s > always an XPath expression. > > I don’t really like it because it means there are three kinds of > attributes: attributes that are always and only strings (@name), > attributes that are AVTs (@href and many others), and attributes that > are always expressions (@document-properties, @select). > > On the other hand, I don’t like the fact that every literal expression > of a map in document-properties is always going to have all those > annoying double-escaped braces. > > Be seeing you, > norm > > P.S. Note that using p:with-option/@select here isn’t an, uh, option, > because p:inline isn’t a step. > -- Gerrit Imsieke Geschäftsführer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsieke@le-tex.de, http://www.le-tex.de Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 Geschäftsführer: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt, Dr. Reinhard Vöckler
Received on Thursday, 7 September 2017 14:49:40 UTC