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 February 24th, 2006, 06:48 AM
Registered User
 
Join Date: Feb 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default use of xsl:number

I have an xhtml-file (nothing special at it). Now I would like to number the h?-tags (like h1=1 h2=1.1 h3=1.1.1).

My xslt-code is like this:

<xsl:template match="/">
   <xsl:number level="multiple" lang="de" grouping-separator="." count="h1|h2|h3" format="1.1.1" />
</xsl:template>


But if I apply this to my xhtml-file I get the following fault:

Unimplemented block at preproc.c:725
Segmentation fault


any idea where the bug is? thanks!


 
Old February 24th, 2006, 07:34 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

The problem is clearly something to do with your XSLT processor or your processing environment, which you have told us nothing about. You need to go to your vendor's product support site.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old February 24th, 2006, 08:12 AM
Registered User
 
Join Date: Feb 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, I use xsltproc. The command looks like:

$ xsltproc number.xsl website.xhtml > /tmp/output.xhtml

[number.xsl includes the posted xslt-code]
[website.xhtml is a simple xhtml-file]

by the way: is the xsl:number-code correct?




 
Old February 24th, 2006, 02:58 PM
Registered User
 
Join Date: Feb 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I thought the format is can be one of the following:
format="1" results in 1 2 3 . .
format="01" results in 01 02 03
format="a" results in a b c . .
format="A" results in A B C. .
format="i" results in i ii iii iv . .
format="I" results in I II III IV . .

Try without any attributes and see processor runs it, if it does try adding one attribute and check where is the problem!


 
Old February 27th, 2006, 04:21 AM
Registered User
 
Join Date: Feb 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by venutm
Try without any attributes and see processor runs it, if it does try adding one attribute and check where is the problem!
lang="de" was the problem. looks like xsltproc don't like it ;)! without there is no problem! thanks!






Similar Threads
Thread Thread Starter Forum Replies Last Post
line number in xml using xsl and html link mrame XSLT 3 June 17th, 2008 01:36 PM
how to assign fo:page-number to a xsl:variable or jyotsnag XSLT 0 March 14th, 2006 01:49 AM
help in xsl getting row number pandian XSLT 6 January 23rd, 2006 10:00 AM
xsl:number N.Todd XSLT 3 October 7th, 2003 08:32 PM
XSL Transform with xsl string NOT xsl file skin XSLT 0 June 16th, 2003 07:30 AM





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