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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format