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

AW: Refinement: creating namespaces in a generated scr

Subject: AW: Refinement: creating namespaces in a generated script
From: "Fries, Markus, fiscus GmbH, Bonn" <M.Fries@xxxxxxxxxxx>
Date: Wed, 18 Sep 2002 13:27:59 +0200
creating namespaces
"/ns1:elem1/ns1:elem2/ns2:elem3/ns2:elem3" is a text node in my input. The
first transformation which puts this into the select attribute of an
xsl:apply-templates element works fine. But the second transformation with
the generated template fails as the "prefix must resolve to a namespace". So
the namespace declaration is not needed in content.xml .  The idea with the
wrapper is good though, I can write some external stuff for that (perl, sed,
or s.th. similar)

Thanx


-----Ursprüngliche Nachricht-----
Von: David Carlisle [mailto:davidc@xxxxxxxxx]
Gesendet: Mittwoch, 18. September 2002 12:51
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: Re: Refinement:  creating namespaces in a generated script



] 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>


If the file does not have namespace declarations then it does not
conform to the namespace spec and it can not be used as input to XSLT at
all. XSLT only works on Namespace conforming documents.

If you can not edit the file you can make a wrapper file that looks
like

<!DOCUMENT foo [
 <!ENTITY content SYSTEM "content.xml">
]>
<foo
 xmlns:ns1="http//foo.bar.ns1"
 xmlns:ns2="http//foo.bar.ns2"
>
&content;
</foo>

Then use this file as input to your XSLT transform.

David


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

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

 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.