Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Entities from the command line

Status
Not open for further replies.

littlepixel

Programmer
Jun 5, 2004
4
0
0
CA
I've got a tricky bit of web design going whereby I pass a parameter to my xml parser (Saxon) via the command line. For instance, to transform my xml database into html pages, I run a batch file with multiple lines of the type:

saxon -o myOutputfile.html myXMLFile.xml myXSLFile.xsl param="Value" param2=value2 and so forth.

Now this works amazing, and I can generate all my requisite files, usually something like

saxon -o sprocket.html myXMLFile.xml myXSLFile.xsl search="sprocket" title="All our Sprockets"

and it will generate a nicely formatted page with all the sprocket products and the title 'All our Sprockets'

BUt now I'm running into problems because I need to pass unicode characters (Greek) to the parameters, but DOS converts them to baké moji as they say in Japanese, Ghost Writing.

So I thought, since I can't really be bothered to figure out code pages and all that other MS BS, I should pass my parameters in as entities like α β γ and so forth, but now I can't get the entities to be replaced, so I'm getting those strings 'α, β' literally and not the greek characters.

Is there any way to do it? My XSL looks like this right now:

<h2><xsl:value-of select="$title"></h2>

and I pass the title parameter in at the command line. Is there a way to rewrite that so the entities get replaced?

Any help is appreciated.

-Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top