473,394 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Saxon Template Reference

39
Hi everyone,

I hope this is a simple (syntax) thing and that someone can point me in the right direction.

At the moment, I am successfully processing an XML file with Saxon (from the command line) and get the output that I expect.

However, the XSL file that I have 'inherited' contains multiple templates. e.g.

<xsl:template match="/">
XSL ... stuff
</xsl:template>

<xsl:template name="record">
More XSL ... stuff
</xsl:template>

So far my processing only takes the first template so now I need to know how to get it to process the file using the second template.

Here is my calling syntax (written all on one line normally) ...

java -jar saxon9he.jar -t -s:c:\xml\fragment.xml -xsl:c:\xml\xsl_file.xsl -o:c:\xml\fragment.txt

I am sure that all I need to do is to 'plug' in a reference to the named template and indeed the saxon documentation mentions various parameter options but I am not clear about how this is implemented.

Anyway, I hope that someone has a little tip or a snippet of code for me.

Regards and thanks,
Alan
Mar 31 '10 #1

✓ answered by jkmyoung

What is in your XSL ... stuff ?
Do you have a <xsl:apply-templates select="record"/> or something like that in the main template?

2 2195
jkmyoung
2,057 Expert 2GB
What is in your XSL ... stuff ?
Do you have a <xsl:apply-templates select="record"/> or something like that in the main template?
Mar 31 '10 #2
asearle
39
Yes, there is also this in the main template ...

<xsl:for-each select="xxxFile/Record">
<xsl:call-template name="record"/>
</xsl:for-each>

Which means I am barking up the wrong tree.

There are differences between the XSL and the XML which is the reason why no records are being returned.

Your question nudged me in the right direction and now I can investigate further.

Many thanks,
Alan
Mar 31 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Johannes Busse | last post by:
hello NG, (1) I have a data-structure like the following: <element name="abc"> <source href="http://some.where.there/file/name.xhtml#location" /> </element> ... <element> ...
1
by: Collin VanDyck | last post by:
I've got a simple Java program: public class Test { public static void main(String args) { System.out.println("xalan class: " + ...
4
by: Johannes Busse | last post by:
Hello NG, I'm struggling with the following problem. I think can be solved quite easily (in fact it should be a FAQ), but it seems that I cannot solve it myself :-( my source looks like...
0
by: Gabriel | last post by:
Greetings, After 6 hours of fruitless research, I ask for your help ! I have an svg file and use Saxon latest implementation, openSource version. it holds nodes whose path are : svg/g/g/text...
4
by: mikea_59 | last post by:
I'm getting different results from XMLSpy and Saxon translations - both are updated versions. Maybe someone here can give me some insight. Here is my input: <MESSAGE> <msgName> <B enum="1">...
2
by: Dr. Roger Wießner | last post by:
Hello! I am a newbie to XSLT and need a freeware/GNU Tool to get experience with this new topic. Which one is a good XSLT? Xalan or Saxon, or which one else? Thank you a lot!
4
by: Rolf Kemper | last post by:
Hi All, ned help on the example below. It works fine for msxml3/4 but has problems with saxon. Saxon complains "can not find matching function ..... " My target is to write style sheets...
1
by: Swami Tota Ram Shankar | last post by:
"Bob Weigel" <dontuwish@nothing.net> wrote in message > > While George Bush, is the epitome of evil, racism, and uncompassionate > > conservatism, Kerry is either deluded, very deluded, or...
5
by: jhurrell | last post by:
I have been having some trouble getting my XSL style sheet to parse correctly. I have some XML outputted from an SQL-Server, that I then need to turn into multiple HTML files. This I have done...
3
by: MarkMYoung | last post by:
I'm trying to transform an ugly Lotus Notes database into a condensed XML file for loading into another product that only needs ~25% of the data. For some reason, my template matches only work for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.