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 11th, 2007, 05:08 AM
Authorized User
 
Join Date: Apr 2007
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating Target Elements with Namespaces

Hi ,

i want to creat xml elements using xsl . For these xml elements i need to specify namespaces either default or prefixes .

How i can do that , how i can mention them in xsl .
If any one of you know help me . is there any document or link where in i can get more help on this.

Thanks & Regards,
Sasi.A

A. Sasi
__________________
A. Sasi
 
Old April 11th, 2007, 05:31 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You can create elements in a namespace either using a literal result element:

<h:html xmlns:h="http://www.w3.org/1999/xhtml"/>

(Here the namespace declaration of xmlns:h can be on the element itself or on any containing element in the stylesheet)

or using xsl:element

<xsl:element name="h:html" namespace="http://www.w3.org/1999/xhtml">

(If the namespace attribute is omitted, then the prefix "h" in this example is used to locate a namespace declaration in the stylesheet.)

You will find more information in any XSLT reference book (including, of course, my own!)



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
NavigateUrl and Target spacy ASP.NET 1.x and 2.0 Application Design 9 November 5th, 2007 12:23 PM
Mapping of elements from 2 different Namespaces AjayLuthria XSLT 1 April 20th, 2007 07:34 AM
can't deploy on target machine zayasv VS.NET 2002/2003 1 March 25th, 2006 09:31 AM
target="_top" crmpicco HTML Code Clinic 3 March 23rd, 2005 12:50 PM
Target for main frame? Snib Javascript How-To 6 December 13th, 2003 04:40 PM





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