[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Data type conversion in xslt 2


Subject: Re: [xsl] Data type conversion in xslt 2
From: "Joseph L. Casale jcasale@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 6 Mar 2015 13:21:50 -0000

>> I have some transforms that generate source code and window
>> reg files.
>
>"window reg files"? "Micrsoft Windows registry files??"

I am creating the reg file, yes for example given the following xml:

<Test>
  <test>
    <value>value a</value>
    <value>value b</value>
    <value>value c</value>
  </test>
</Test>

and I will need to output the following:


Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Test]
"test"=hex(7):76,00,61,00,6c,00,75,00,65,00,20,00,61,00,00,00,76,00,61,00,6c,
\
  00,75,00,65,00,20,00,62,00,00,00,76,00,61,00,6c,00,75,00,65,00,20,00,63,00,
\
  00,00,00,00


So you can see that these are double byte wide representations of
each character in the <value> elements, where each <value> is further
appended with a \0 or "00,00" and finally the sequence is also terminated
the same way.

Sorry about that, it was not very clear.

Thanks everyone.
jlc


Current Thread