XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
dave livingstonSubject: Printer Hex code help
Author: dave livingston
Date: 12 Feb 2007 08:47 PM
XML & XSLT works so well to format a text document to send to a printer, especially in the Linux world. Then we run into the problem of being able to do a simple thing such as output an escape character to be able to configure the printer. Such a simple thing that we have been doing for years...long before all of this XML hoopla.

All I want to do is put a x1b but there sure does not seem to be any easy way to day that. I've tried all kinds of &#x1b which sure seems like it should work. since it is an output for goodness sakes..but no dice...not a "legal" XML character. Sure seems like someone missed the boat on this....

Anyone have a simple method to do this?

dave

Posttop
Tony LavinioSubject: Printer Hex code help
Author: Tony Lavinio
Date: 12 Feb 2007 08:53 PM
If your parser supports XML 1.1, you can use 

Otherwise, a common method is to define some other
character and put a filter on it. Suppose you decide
to use &#x7F - you could do something like this:

java -classpath saxon8.jar net.sf.saxon.Transform input.xml xform.xsl | tr '\177' '\033' | lpr

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.