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 April 30th, 2007, 12:53 AM
Authorized User
 
Join Date: Apr 2007
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default extension-element-prefixes

Hi All,
i am using XALAN Engine to transform the xml using xsl . My xsl doesnt contain extension-element prefixes .But i am using js:somefunction where js pointing to namespace .It still gives the proper result . i have studied in web that extension-element-prefixes is needed when your calling extension but how xalan understands that it is a extension without extension-element-prefixes .

what is the exact purpose of extension-element-prefixes .

Thanks & Regards,
SASI.A

A. Sasi
__________________
A. Sasi
 
Old April 30th, 2007, 02:03 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I'm not very familiar with the Java library but you maybe using extension functions not extension elements. Extension element are elements outside the http://www.w3.org/1999/XSL/Transform namespace that act as instructions rather than being copied to the output. That is why extension-element-prefixes is used, to notify the processor of this. Extension functions are non-intrinsic functions. You maybe using a combination of these and possibly Xalan has some namespaces, such as the one mapped to "js", hard-coded into the processor as an extension prefix. This is analogous to the Microsoft COM parser's treatment of its msxsl prefix which is used to define the script element used to create JavaScript extension functions.

--

Joe (Microsoft MVP - XML)
 
Old April 30th, 2007, 03:35 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You haven't shown us your code but I suspect you are using extension functions rather than extension elements.

To use an instruction like <my:instruction>, you need to set extension-element-prefixes="my". You don't need this if all you are doing is calling an extension function, for example <xsl:value-of select="my:function(abc)"/>.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Not using Namespace prefixes stuohy XSLT 6 June 19th, 2012 04:23 PM
xsl:exclude-result-prefixes #all and #default maxtoroq BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 4 July 28th, 2008 12:10 PM
XML problems - prefixes and asp.net supergirl_gem XSLT 7 July 3rd, 2007 01:56 AM
XPATH: Retrieve Value without namespace prefixes ramesh.kumarm XSLT 4 September 14th, 2006 03:50 AM
maximum number of prefixes? gumgak ASP.NET 1.0 and 1.1 Basics 5 February 13th, 2006 09:56 AM





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