Subject: RE: [xsl] Temporary tree elements and namespaces: Further question From: <marrocdanderfluff@xxxxxxxxxxx> Date: Thu, 14 Feb 2008 14:15:44 -0000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Temporary tree elements a, "João C. Morais" | Thread | Re: [xsl] Temporary tree elements a, Florent Georges |
RE: [xsl] Extracting text between n, Michael Kay | Date | RE: [xsl] Extracting text between n, Wendell Piez |
Month |