Subject: Re: [xsl] Data type conversion in xslt 2 From: "Syd Bauman s.bauman@xxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 6 Mar 2015 04:07:18 -0000 |
I have no idea what you're talking about, but it sounds like you want to output a string that includes U+0000 characters in your output. This is hard, if not impossible, to do in XSLT because an XSLT program is an XML document, and U+0000 is not a valid character in an XML document. See production 2 of the XML spec, which says: Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] I don't actually have a suggestion at the moment, since you can't easily write a NUL character out using commandline `sed` or `perl` eihter. (My suggestion would normally be to have XSLT output U+2400 instead, and then convert those to NUL using something like `sed` or `perl`.) > I have some transforms that generate source code and window > reg files. The reg files include REG_DWORD and REG_MULTI_SZ > values. The xml input is required to setup defaults, the REG_DWORD > values aren't difficult to deal with when using integer input in the xml > as they require decimal to hex conversion. However the REG_MULTI_SZ > values are required to be a sequence of null-terminated strings, > terminated by an empty string (\0). So this ends up being a comma > separated list of bytes. > > What is the most optimal way to produce such output in xslt?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Data type conversion in xslt , Joseph L. Casale jca | Thread | Re: [xsl] Data type conversion in x, Dimitre Novatchev dn |
[xsl] Data type conversion in xslt , Joseph L. Casale jca | Date | Re: [xsl] Data type conversion in x, Dimitre Novatchev dn |
Month |