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

RE: Refinement: creating namespaces in a generated scr

Subject: RE: Refinement: creating namespaces in a generated script
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 18 Sep 2002 13:30:06 +0300
RE: Refinement:  creating namespaces in a generated scr
Hi,

> staroffice/content.xml (which does not include namespace 
> declarations for
> ns1, ns2, ns):
> 
> <text:p text:style-name="Standard">
>   <text:variable-set text:name="__Adressen_jeweilsInZeile"
> text:value-type="string">
> /ns1:elem1/ns1:elem2/ns2:elem3/ns2:elem3</text:variable-set> 
> </text:p>
> 
> 
> generated.xsl
> 
> <xsl:template match="/ns1:elem1/ns1:elem2/ns2:elem3/ns2:elem3">
> 
> 
> All the missing namespaces have the same format:
> xmlns:ns1="http//foo.bar.ns1"
> xmlns:ns2="http//foo.bar.ns2"

Instead of writing an XPath parser in XSLT to get the namespace prefixes, wouldn't it be easier to hard-code the ns-declarations, since I would guess that in your case they're

xmlns:office="http://openoffice.org/2000/office"
xmlns:style="http://openoffice.org/2000/style"
xmlns:text="http://openoffice.org/2000/text"
xmlns:table="http://openoffice.org/2000/table"
xmlns:meta="http://openoffice.org/2000/meta"
xmlns:script="http://openoffice.org/2000/script"
xmlns:draw="http://openoffice.org/2000/drawing"
xmlns:chart="http://openoffice.org/2000/chart"
xmlns:number="http://openoffice.org/2000/datastyle"
xmlns:config="http://openoffice.org/2001/config"

or do you really need to generate them dynamically?

Jarno

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.