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 May 3rd, 2006, 04:01 PM
Registered User
 
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddiuszho Send a message via MSN to toddiuszho Send a message via Yahoo to toddiuszho
Default Opposite of string()

Is there a way to do the opposite of the string() function? I want to parse a string into additional source nodes to be processed. I know for the output tree I can do value-of with disable-output-escaping set to yes. But that will not run template rules on the resultant nodes.

A lot of markup languages will have something akin to a description or documentation tag with a text or CDATA as content (a lot of RSS feeds do this). But the actual text will "look like" well-formed markup, say XHTML, that is meant to be eventually be rendered for presentation.

I want to do a little bit more processing on this "markup disguised as text" than just outputting it verbatim. Like maybe force hyperlinks to open in a new window, or attribute images so they can't be bigger than a certain size, etc.

XSLT already has a document() function, so if parsing an entire additional file of markup is no big deal, then how much harder could it be to parse a string snippet?

 
Old May 3rd, 2006, 04:27 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

There's nothing in the standard to do this (even in 2.0), but Saxon has a saxon:parse() extension that does what you want. With other processors you can call out to an extension function of your own.

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
Casting String array to string Samatha ASP.NET 1.0 and 1.1 Professional 1 December 5th, 2006 07:46 AM
syntax to find a string in a string cole SQL Server 2000 2 October 10th, 2005 06:06 PM
Opposite to INNER JOIN query crisan Access 1 April 29th, 2005 06:50 AM
Opposite of UNION Ned SQL Server 2000 1 June 23rd, 2003 10:19 AM





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