[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to generate an xmlns attribute with a prefix

Subject: How to generate an xmlns attribute with a prefix
From: Marc Van Limberghen <marc2jogger@xxxxxxxxx>
Date: Thu, 6 Aug 2009 11:30:54 -0700 (PDT)
 How to generate an xmlns attribute with a prefix
Hello,
I am transforming with XSL a source XML to a target XML. I can design the source XML myself. I can not decide on the structure of the target XML.
The target XML must have as its root element the following piece of XML:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" default-lazy-init="true">

I could obtain the xmlns attribute in my target XML, by putting it in the <xsl:stylesheet> element.
But I do not find a way to generate either the xmlns:xsi and xsi:schemaLocation attributes.
I read a lot of FAQs on namespaces and prefixes but could not find an answer.

I use:
XML version 1.0
XSLT Stylesheet version 1.0
Xalan XSLT processor Xalan-Java v 2.7.1 (but I donot use Java, I use XSL)

All help is much appreciated!
Marc

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.