Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce character maps #290

Closed
xml-project opened this issue Feb 14, 2018 · 3 comments
Closed

Introduce character maps #290

xml-project opened this issue Feb 14, 2018 · 3 comments
Assignees

Comments

@xml-project
Copy link
Member

Action: Implementation and syntax to be determined, does anyone object to adding them?
Consensus: Someone to write up a proposal.

See: minutes, day 1

@gimsieke
Copy link
Contributor

gimsieke commented Feb 14, 2018

One way to specify it could be to say that character maps are xsl:character-map elements, either imported from an XSLT library or supplied in a document node (maybe generated by a step in the pipeline).
If they are imported from an XSLT document, the name probably needs to be an EQName in the imported namespace. (And the list of imported elements will get longer: Functions, possibly global variables, possibly keys, character maps.)

https://www.w3.org/TR/xslt-xquery-serialization-31/#character-maps
https://www.w3.org/TR/xslt-30/#character-maps

@xml-project
Copy link
Member Author

I doubt it will be possible to directly import character maps from XSLT because we rely on third party software there. We would need a processor which exposes the character maps via API. A change in this third party API would lead to an XProc crash.

I would certainly prefer an XProc element which, so the processor could take care of it. But aligning as closely as possible with XSLT or XQuery is certainly a must.

@gimsieke
Copy link
Contributor

Ok, I didn’t realize that they are also used in XQuery, like here: http://www.datypic.com/books/xquery/chapter13.html#example.Option-declarations-doc
XSLT users who already use maps it will be interested in recycling them.
If we go for output:serialization-parameters documents like the one linked above (and also used by Saxon-JS), there may be a clash between the serialization parameters passed as a map and this document. Maybe we need back-and-forth conversion steps between serialization parameters and documents. Or maybe go for XPath maps only.
Both XQuery examples don’t allow associating a name with the character map. Do we need named character maps if we can simply pass a variable that holds the map?

Also accepting xsl:character-map as map does not imply reliance on 3rd-party products. You just read the name/value pairs from the xsl:character-map and pass them to your serializer in its preferred representation.

@ndw ndw self-assigned this Mar 17, 2018
@ndw ndw closed this as completed in #334 Mar 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants