This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Printer Control Characters (was untitled)
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] RE: Printer Control Characters (was untitled)
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 9 Mar 2001 11:41:43 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I'm trying to insert a string into xsl which includes a
> printer escape code
> e.g.
> <input type="text" name="field1" id="field1"><xsl:attribute
> name="value"><xsl:value-of
> select="./PremisesOfLoading"/>M</xsl:attribute></input><br></br>
>
> where M is the hex code for 'Select 12cpi' for my Epson printer.
> The code appends this escape code to the text retreived from the
> "./PremisesOfLoading" branch in the xml but when I process
> this I'm still
> seeing M appended to the value in the "./PremisesOfLoading"
> branch(ESC M is M in Hex)
>
No it isn't: x4D is simply "M", not "ESC M".
ESC is a C0 control character and as such is not a legal XML character, so
you can't produce it in XSLT output. You'll have to find a different
approach, e.g. output a processing instruction
<?ESC M?> and write a ContentHandler to convert this at serialization time.
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list