Browse DevX
Sign up for e-mail newsletters from DevX

Search the Tips
Tip Bank > XML > XSLT


1-20 of 26     Previous     Next
Using Templates for Concurrent XSLT Transformations
by Leonard Anghel
Use Templates to use a Transformer object (from the TrAX API) in multiple threads running concurrently.
Blocking Namespace Declarations in XSLT Transformation Results
by Leonard Anghel
Suppose you want to block a namespace declaration from appearing in your XSLT transformation results. You'd have to use the exclude-result-prefixes attribute in the stylesheet element.
Use the XSLT 2.0 Character-map Element to Replace Characters
by Leonard Anghel
Here's an example of how to use XSLT 2.0's new character-map element to replace a character (or group of characters) with another character (or group of characters) on the transformation runtime.
Insert an XML Schema into an XQuery Query
by Leonard Anghel
This tip shows you how to insert an XML Schema into an XQuery query.
Import an XML Schema into a Stylesheet Using XSLT 2.0
by Leonard Anghel
This tip shows you how to import an XML schema in your XSL pages, using XSLT 2.0.
Create a "Current Date" Extension Element for Xalan
by Leonard Anghel
This tip is just a small application that creates an extension element for the Xalan processor.
Process an XSL-FO Document
by Leonard Anghel
Learn how to use the FOP processor classes to process XSL-FO documents.
Use XSL-FO to Obtain a Page Number
by Leonard Anghel
This tip shows you how to use the fo:page-number and fo:page-number-citation elements to insert page numbers.
Compatible Stylesheets with xsl:fallback
by Leonard Anghel
This code shows you how to use the xsl:fallback element to achieve full compatibility between XSLT different versions.
Using the unparsed-entity-uri XSLT Function
by Leonard Anghel
This tip shows how to insert an image into the result-tree of an XSLT transformation using the unparsed-entity-uri function.
Read the First Line of a Text File
by Leonard Anghel
This code shows you how to use the instance methods from the FileReader and BufferedReader classes with a Xalan 2 processor to read the first line from a text file.
Grouping and Summing the Values in XML Using XSLT
by Siddhartha Singh
Simplifying the Creation of Links when Transforming XML with XSLT
Simplifying the Creation of Links when Transforming XML with XSLT
Using Parameters in XSL Select Statements
by DevX Pro
Given the XML file: Sometimes we want to display name1 and sometimes name2. We figured that perhaps we could set a parameter. Then we could pass in the name of the attribute as the value using the addparameter method on the processor object. Then maybe we'd access the required attribute like this: or "@$temp" but you get the idea)
Changing the Value of Global Parameters
by DevX Pro
With XSL, can I change the value of global parameters inside the templates named temp?
Filtering On Node Name
by DevX Pro
I have an XML document for news items. It has a tag which has 3 child nodes , and , of which there can be multiples with the one tag. For example: What I want to be able to do is branch to a given template, depending on the name of the node in the order that they displayed, within the tag. I have tried using and , but where I keep getting stuck is in testing for the name of the current node. I could, of course, use a generic tag called, and let it have an attribute called "type" Then I could evaluate the branching the attribute, but, in a way, this defeats the purpose of using XML. What would you suggest?
Using XSLT to Comma Delimit Node Values
by DevX Pro
I have the following code in an XML file: Fredonia AFB Russia Luka Russia 140N4506 64E3507 Sevastopl Bosie 140N4506 64E3507 Ukraine How can I set up an XSL sheet to correctly comma delimit the children of in this file so that I get: Russia, Fredonia AFB Russia, Luka 140N4506, 64E3507 Ukraine, Sevastapol, Boise,140N4506,64E3507 The order should be a correct comma delimit in this order: ,,,,— if they are there.
Back-Referencing A Matched Element
by Manoj K.
You can use the dot operator (.) in XSL transformation stylesheets to refer to, effectively, "whatever element was just identified." ...
XHTML and Javascript
by DevX Pro
Can Javascript code be used in XHTML Web pages?
Add a Counter to Your Web Page With XHTML
by Kurt Cagle
Browsers Targeted: Internet Explorer 3+, Netscape Navigator ...
1-20 of 26     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date