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

RE: Temporary tree elements and namespaces: Further q

Subject: RE: Temporary tree elements and namespaces: Further question
From: <marrocdanderfluff@xxxxxxxxxxx>
Date: Thu, 14 Feb 2008 14:15:44 -0000
RE:  Temporary tree elements and namespaces: Further  q
Hi all, [xsl 1.0, processor .NET XslTransform]

I read this thread with interest and it helps me a great deal but not
completely. I'm bringing in another document. My transform is from xhtml to
xhtml so I have the following declarations (including default declaration
for xhtml):

<xsl:stylesheet 	version="1.0" 
			xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
			xmlns:xhtml="http://www.w3.org/1999/xhtml" 
			xmlns="http://www.w3.org/1999/xhtml" 
			exclude-result-prefixes="xhtml">

I then load a reference document map.map (with no internal namespace) to
relate pairs of files together in links. It contains:
	<mappings>
		<relationship topic="1561.htm" toc="toc9497.htm" />
		<relationship topic="950.htm" toc="toc.htm" />
		.
		.
	</mappings>

Which I load into a variable as follows:

	<xsl:variable name="mappings"
select="document('map.map')/mappings/relationship" />

Which I'm assuming loads _all_ the relationships into $mappings.

The next step is to recognise the @href in the source document for, for
instance, 1561.htm (as shown above) and use it to look up the corresponding
filename toc9497.htm. This doesn't go well because I don't have separate
namespaces:

	<xsl:value-of select="$mappings/relationship[@topic=@href]/@toc">

Where @href is in the default xhtml namespace and @topic and @toc are in the
new namespace.

The question is, where do I declare the new namespace and how do I ensure it
is applied to the relationships and attributes in map.map?

Thanks again,
Richard

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.