James A. Robinson
Usenet Archive
- Joined
- Jul 30, 2003
- Messages
- 1
- Reaction score
- 0
Hello folks,
I'm hoping someone can point out a core concept I seem to be missing w/re to the conversion of an XML document with XSL/XSLT. What do you do when you need to take your unicode rich document and transform it to a format which which needs something other numeric character references?
For example, what would I do if I wanted to output an XML document to a format where I needed to replace the greek delta character with a very specific string (say to something in TeX, or just 'delta' if outputting to a plain text us-ascii encoded file)? I think I understand how core xml parsing (input) handles unicode (be it native encoding or NCR), but I don't understand what's supposed to happen when transforming the XML to an output which does NOT support unicode or SGML style character entities.
I am aware of the possibility of using an XSLT function which does a substring search and replace for characters, but surely there is a better option? I'm also aware I can do a final stage processing with a tool of my own design (something which walks through and replaces unicode characters with something else from a mapping). But is there a core XSLT or other XML technology which I am missing that is intended to solve this type of problem? Which lets me say that, if I'm outputting a US-ASCII encoded document that instead of Δ I want to dump out 'Delta' or '$\Delta$' or '<IMG SRC="/images/Delta.gif">'?
Thanks much for any wise words on the topic.
Jim Robinson
I'm hoping someone can point out a core concept I seem to be missing w/re to the conversion of an XML document with XSL/XSLT. What do you do when you need to take your unicode rich document and transform it to a format which which needs something other numeric character references?
For example, what would I do if I wanted to output an XML document to a format where I needed to replace the greek delta character with a very specific string (say to something in TeX, or just 'delta' if outputting to a plain text us-ascii encoded file)? I think I understand how core xml parsing (input) handles unicode (be it native encoding or NCR), but I don't understand what's supposed to happen when transforming the XML to an output which does NOT support unicode or SGML style character entities.
I am aware of the possibility of using an XSLT function which does a substring search and replace for characters, but surely there is a better option? I'm also aware I can do a final stage processing with a tool of my own design (something which walks through and replaces unicode characters with something else from a mapping). But is there a core XSLT or other XML technology which I am missing that is intended to solve this type of problem? Which lets me say that, if I'm outputting a US-ASCII encoded document that instead of Δ I want to dump out 'Delta' or '$\Delta$' or '<IMG SRC="/images/Delta.gif">'?
Thanks much for any wise words on the topic.
Jim Robinson