xsl-list
[Top] [All Lists]

RE: Can XSLT produce binary output: ASN.1-BER

2002-11-22 07:17:25



I have a XML document and would like to transform it to ASN.1-BER. 
How would I do this with XSLT? 
Does not seem like a good idea. Of course it's Turing complete. Heh
The BER is a binary format but so is PDF. Therefore it should be
possible?
Has anyone done that already?

PDF is a text format with the possibility of having various stream
filters inside it. 

The following text is a valid PDF file from the PDF specification:

%PDF-1.3
1 0 obj
<< /Type /Catalog
/Outlines 2 0 R
/Pages 3 0 R

endobj
2 0 obj
<< /Type /Outlines
/Count 0

endobj
3 0 obj
<< /Type /Pages
/Kids [4 0 R]
/Count 1

endobj
4 0 obj
<< /Type /Page
/Parent 3 0 R
/MediaBox [0 0 612 792]
/Contents 5 0 R
/Resources << /ProcSet 6 0 R
/Font << /F1 7 0 R >>


endobj
5 0 obj
<< /Length 73 >>
stream
BT
/F1 24 Tf
100 100 Td
(Hello World) Tj
ET
endstream
endobj
6 0 obj
[/PDF /Text]
endobj
7 0 obj
<< /Type /Font
/Subtype /Type1
/Name /F1
/BaseFont /Helvetica
/Encoding /MacRomanEncoding

endobj
xref
0 8
0000000000 65535 f
0000000009 00000 n
0000000074 00000 n
0000000120 00000 n
0000000179 00000 n
0000000364 00000 n
0000000466 00000 n
0000000496 00000 n
trailer
<< /Size 8
/Root 1 0 R

startxref
625
%%EOF


As per my admittedly limited understanding BER is a format for
establishing Binary Encoding Rules, and not a binary format itself. In
other words I have always understood it to be text, a quick google seems
to confirm me in this belief, if you can show me elsewhere that this is
not so I would be appreciative. 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list