Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2007, 11:23 AM
Registered User
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default C++ templates in XSLT

Hi

I need to add tags for C++ templates in a XML documents, producing
a new XML document. For example:

<row> 1 1 "aaaaaa" </row>

should be transform to:

<row> <vector<string> > 1 1 "aaaaaa" </vector<string> > </row>

I tried to do it with XSLT using xsltproc in linux, but
have not found a way to do it, so I am just adding two tags

<row> <vector><string> 1 1 "aaaaaa" </string></vector> > </row>

I would like to have the template datatype in a single tag, ideas?

Thanks !!!

 
Old July 5th, 2007, 04:27 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I'm confused about what you want to achieve. First you say you want to produce XML output, then you give an example of output which very clearly is not XML.

You can produce non-XML output from XSLT if you need to. If it's completely unlike XML (for example CSV) use the text output method. If it's something closely resembling XML but not actually genuine XML, use disable-output-escaping (or in XSLT 2.0, character maps), and make sure you have an XSLT processor that supports this optional feature.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
question on xslt templates -- urgent subbukns XSLT 1 May 21st, 2007 05:17 PM
simple XSLT apply-templates question fannus XSLT 7 March 27th, 2007 02:11 AM
dynamic xslt -> xslt creation namespace problem jkmyoung XSLT 2 July 15th, 2006 12:42 AM
xml and xsl templates as input to xslt gives xml rameshnarayan XSLT 5 August 3rd, 2005 01:58 AM
XSLT Templates bmains XSLT 2 December 16th, 2003 02:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.