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

RE: Namespace problems

Subject: RE: Namespace problems
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Tue, 21 Sep 2004 17:14:01 +0100
xsl namespace problems
> I'm having some problems related to namespaces (I think).

Correct :)

> The source file for the transformation:
>
> <rdf:RDF xml:base="http://a.com/ontology"
> xmlns="http://a.com/ontology#"
  ^^^^^^^^^^^^^

Your source xml has put all elements in this namespace.

[snip]

> On the xsl I'm trying to enter the Products element but with
> no sucess...
>
> <xsl:stylesheet version="1.0" xmlns="http://a.com/ontology#"
                                   ^^^^^^^^^^
This puts the literal result elements of your stylesheet into a
namespace but won't help you with match patterns - you need to specify a
prefix here.  For example xmlns:myprefix="http://a.com/ontology#"

Then use this prefix in your match pattern:

> <xsl:template match="Products">
> 	<xsl:element name="Product_class"/>
> </xsl:template>

<xsl:template match="myprefix:Products">
                    ^^^^^^^^^^^^
Cheers
andrew

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.