ASPN ActiveState Programmer Network  
| RDF Version ActiveState, a division of Sophos
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbook | Documentation | Mailing Lists | Products | User Groups
Submit Recipe
My Recipes

All Recipes
All Cookbooks


View by Category

Advertise Jobs

XSLT Cookbook

Welcome to the XSLT Cookbook, a collaborative collection of techniques from the XSLT community. This living collection allows programmers to be more productive with XSLT.

XSLT Cookbook code is freely available for use and review.

We invite you to contribute regular expressions, snippets of code, comments, and ratings for recipes.

Enjoy!
Ian Maclean, Editor in Chief
Email: xsltcookbook@activestate.com


View:   Editors Pick | Approved | Not Approved | All
1-20 ( found 20 recipes )
<< Previous Next >>

Generic XML document into a SQL database (Astar Seran)
This XSLT generates SQL queries that saves the given document into a database. Uses host-language ...
Modified: 2008/03/09 06:12

Menu and submenu dependent on current page (Sergey Yushckeyev)
Sometimes you have tree-like menu and you want to present it as Main menu and show custom sub menu ...
Modified: 2006/10/24 05:15

Numbering Figures in a Document (Chris Maloney)
Sometimes, in a formal document, you want the figures numbered like "2-3", "5-4", etc., where the ...
Modified: 2005/05/23 21:44

Verbatim Copying of Embedded HTML (HTMLViewer) (Bill Bell)
Some XML sources contain HTML fragments which simply need copying from the source into the output. ...
Modified: 2004/03/21 07:45

Tokenize strings and tabulate (Nick Toze)
Tokenizes strings into result tree fragments then processes those fragments to produce a table. ...
Modified: 2003/03/17 07:03

Convert a flat xml file into a structured (Friedhelm Duesterhoeft)
Most csv to xml converters produce some kind of flat xml code which often needs to be transformed ...
Modified: 2002/09/25 06:29

Tokenize a string (Mats Kindahl)
How to tokenize a string by separating it at a any of several characters and process each token ...
Modified: 2002/09/11 01:06

Fast method to repeat a string (Mats Kindahl)
A recursive template to repeat a string a number of times in a manner similar to the Perl 'x' ...
Modified: 2002/09/10 02:55

Result Pagination with XSL (Not specified Not specified)
My technique for separating Xml results into pages. The great thing is that it is fully implemented ...
Rated: 4 out of 5 by 1 user(s), Modified: 2002/03/21 11:51

search and replace (christoph weingarten)
there is no xpath-function like this: replace(needle, haystack). here's how i managed this ...
Modified: 2001/08/27 03:25

Approved

Count previous nodes (Paul Prescod)
It is sometimes useful to count nodes that precede the current one. One way is to use the built-in ...
Modified: 2001/08/23 16:51

Editors pick

Restricting processing to consider only the first instance of an element (Brian Quinlan)
Sometimes it is desirable to operate on an element type only once, even if it appears many times in ...
Rated: 4 out of 5 by 1 user(s), Modified: 2001/08/03 18:28

Approved

Generating a newline (Paul Prescod)
Most newlines in XSLT are considered only for pretty-printing the input document. Unless they are ...
Rated: 5 out of 5 by 3 user(s), Modified: 2001/07/05 20:29

Approved

Creating empty elements (Paul Prescod)
New XSLT users often have problems creating empty elements like <link>, <br>, ...
Rated: 2 out of 5 by 2 user(s), Modified: 2001/06/27 13:23

Approved

Internationalization using language files (Paul Prescod)
XSLT stylesheets often contain "boiler-plate text" like "Footnote", "Total" etc. This text is ...
Rated: 5 out of 5 by 2 user(s), Modified: 2001/06/27 07:51

Approved

Search and Replace (Paul Prescod)
XSLT has no first-class function to search-and-replace. Instead this recipe implements it as a ...
Rated: 5 out of 5 by 3 user(s), Modified: 2001/06/27 07:30

Approved

Getting text children of an element (Paul Prescod)
There are a few ways to get the text from within an element.
Rated: 2 out of 5 by 1 user(s), Modified: 2001/06/27 07:20

Approved

Extract text from XML document (Paul Prescod)
The null XSL stylesheet will output the text of a document, removing all of the tags.
Modified: 2001/06/27 06:26

Approved

Determining the MSXML version (Paul Prescod)
This is not so much an XSLT recipe but it is covered here because other recipes only work with ...
Modified: 2001/06/27 05:58

Approved

Fetching information across in-document references (Paul Prescod)
XML documents often contain references from one type of element (e.g. chapter-ref) to another ...
Rated: 4 out of 5 by 2 user(s), Modified: 2001/06/25 17:56

1-20 ( found 20 recipes )
<< Previous Next >>


Highest rated recipes:

1. Search and Replace

2. Generating a newline

3. Internationalization ...

4. Restricting processing ...

5. Result Pagination with ...

6. Fetching information ...

7. Getting text children of ...

8. Creating empty elements




Privacy Policy | Email Opt-out | Feedback | Syndication
© 2006 ActiveState Software Inc. All rights reserved.