Skip to content

Help parsing Google's SSML #74

Answered by pdvrieze
gad2103 asked this question in Q&A
Sep 12, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

First of all (for the updated bit), you should probably use @XmlSerialName that allows specifying names. The format uses namespaces, "assumes" that there are no special characters in the serial name. You can create your own policy to try to interpret it differently (there is no single way to transform serial names into qnames).

For xml:id, you will need to specify the proper namespace. When serializing, the prefix is used only on an advisory level (because prefixes are not semantically relevant, and multiple prefixes for the same namespace create unneeded noise). The value you want is:
@XmlSerialName("id", "http://www.w3.org/XML/1998/namespace", "xml").

note while the prefix xml is force…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gad2103
Comment options

@pdvrieze
Comment options

Answer selected by pdvrieze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants