Subject: RE: Namespaces...
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 30 Jun 2003 10:00:44 +0100
|
Your Content element is in a namespace, so any XPath expressions and
patterns that refer to it need to use a namespace prefix that's bound to
the right namespace URI. Default namespaces don't apply to names in
XPath expressions and XSLT patterns.
Michael Kay
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Gamperl Markus
> Sent: 30 June 2003 08:28
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Namespaces...
>
>
> Hello experts!
>
> I have the following XML-File:
>
> <tcm:Component xmlns:tcm="http://www.fasdfsdf.com"
> xmlns:xlink="http://www.w3.org/1999/xlink" ID="tcm:75-20502"
> IsEditable="false">
> <tcm:Data>
> <tcm:Title>test figure</tcm:Title>
> <tcm:Type>Normal</tcm:Type>
> <tcm:Schema xlink:type="simple" xlink:title="figure"
> xlink:href="tcm:75-922-8"/>
> <tcm:Content>
> <Content xmlns="urn:DTD922">
> <fig_title_eng>test figure</fig_title_eng>
> <fig_file_eng
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:type="simple" xlink:href="tcm:75-20500"
> xlink:title="multimedia test"/>
> <fig_file_ger
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:type="simple" xlink:href="tcm:75-20500"
> xlink:title="multimedia test"/>
> <meta_data>
> <meta_source_document
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xlink:type="simple" xlink:href="tcm:75-1914" xlink:title="000
> Unbekannt"/>
> </meta_data>
> </Content>
> </tcm:Content>
> <tcm:Metadata/>
> <tcm:ApprovalStatus xlink:type="simple"
> xlink:title="Undefined" xlink:href="tcm:0-0-0"/>
>
> <tcm:IsBasedOnTridionWebSchema>true</tcm:IsBasedOnTridionWebSchema>
> <tcm:MultimediaType xlink:href="tcm:0-0-0" xlink:title=""/>
> </tcm:Data>
> </tcm:Component>
>
> The "Content-Element" has a default-Namespace and how do i
> have to write my XSL-Templates to access the "Content-Element"?
>
> Here is the Stylesheet:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:tcm="http://www.tridion.com/ContentManager/5.0">
> <xsl:output method="xml" version="1.0" encoding="UTF-8"
> indent="yes"/>
> <xsl:template match="/">
> <test>
> <xsl:apply-templates/>
> </test>
> </xsl:template>
> <!--
> -->
> <xsl:template match="tcm:Component">
> <xsl:apply-templates/>
> </xsl:template>
> <!--
> -->
> <xsl:template match="tcm:Content">
> <xsl:message>in tcm:Content</xsl:message>
> <xsl:apply-templates/>
> </xsl:template>
> <!--
> -->
> <xsl:template match="Content">
> <xsl:message>in Content</xsl:message>
> <xsl:apply-templates/>
> </xsl:template>
> <!--
> -->
> <xsl:template match="fig_title_eng">
> <xsl:message>in fig_title under Content</xsl:message>
> <xsl:apply-templates/>
> </xsl:template>
> <!--
> -->
> </xsl:stylesheet>
>
> How do i have to implement my "Content-Template" that it
> works - with this template it doesn't work - the message "in
> Content" doesn't appear, also the message "in fig_file under
> Content" doesn't appear...
>
> Thank you very much!!!
>
> Greetings
> Markus
>
>
>
>
> __________________________________________________________________
> McAfee VirusScan Online from the Netscape Network.
> Comprehensive protection for your entire computer. Get your
> free trial today!
> http://channels.netscape.com/ns/computing/mcafee/index.jsp?pro
mo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|