Re: [xsl] XSL new user question: no output from a simple XSLT

Subject: Re: [xsl] XSL new user question: no output from a simple XSLT
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Sep 2007 10:36:43 -0400
At 2007-09-19 09:21 -0500, Dunk, Michael (Mike) wrote:
I'm new to XSLT, working my way through O'Reilly's XSLT and reading
Michael Kay's XSLT Reference. At the moment, I'm stuck on some simple
XSLT. I have looked through the  and for solutions but cannot find
anything that solves this problem.

Can anyone help?

The aim is to transform a complex xml file called
Subject_Area_Groups.xml, see below for a sample of this xml:

<?xml version="1.0" encoding="UTF-8"?> <Subject_Area_Groups xmlns="";

Your un-prefixed elements are in a non-null namespace.

The XSLT that I have written so far is:
<?xml version='1.0'?>

<xsl:stylesheet version="2.0"

<xsl:output method="xml"/>

<xsl:template match="/">

<xsl:apply-templates select="/Subject_Area"/>

You are pushing nodes in no namespace. (BTW, you don't need the leading slash)

Unfortunately, this is not giving any output.

Can anyone see what is wrong with the above XSLT?

The XSLT processor used was Saxon

In XSLT 2.0 you can set the value of the non-prefixed element names in XPath expressions by using the attribute in your xsl:stylesheet element (or anywhere in scope):


I hope this helps.

. . . . . . Ken

Upcoming public training: UBL and code lists Oct 1/5; Madrid Spain
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Jul'07
Legal business disclaimers:

Current Thread