Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: xsl name spaces - filtering xsl name spaces - filteringTo: NULL Date: 3/3/2009 7:13:00 AM Hello,
I'm relatively new to xsl and am floundering when trying to access the
ID and TableID values from the xml below.
Would the multiple names spaces in the Database node cause any
problems?
Thanks in advance.
Rod
<Create xmlns="http://schemas.microsoft.com/analysisservices/2003/
engine">
<ObjectDefinition>
<Database xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID>Insight_Budget</ID>
<Dimensions>
<Dimension>
<ID>Tbl Dim Division</ID>
<Name>Division</Name>
<Attributes>
<Attribute>
<ID>Level0 Name</ID>
<Name>Division Level0 Name</Name>
<Usage>Key</Usage>
<EstimatedCount>39</EstimatedCount>
<KeyColumns>
<KeyColumn>
<DataType>WChar</DataType>
<DataSize>80</DataSize>
<Source xsi:type="ColumnBinding">
<TableID>dbo_tblDimDivision</TableID>
<ColumnID>Level0_Name</ColumnID>
</Source>
</KeyColumn>
</KeyColumns>
</Attribute>
</Attributes>
</Dimension>
</Dimensions>
</Database>
</ObjectDefinition>
</Create>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform" xmlns:xlink_01="http://schemas.microsoft.com/
analysisservices/2003/engine" xmlns:xlink_02="http://www.w3.org/2001/
XMLSchema" >
<xsl:template match="/">
<HTML>
<BODY>
<xsl:apply-templates select="//xlink_01:Create"/>
<xsl:apply-templates select="//xlink_01:Create/ObjectDefinition/
Database/Dimensions/Dimension/ID"/>
<xsl:apply-templates select="//xlink_01:Create/ObjectDefinition/
xlink_02:Database/Dimensions/Dimension/ID"/>
<xsl:apply-templates select="//Create/ObjectDefinition/Database/
Dimensions/Dimension/ID"/>
<xsl:apply-templates select="ID"/>
<xsl:apply-templates select="//xlink_01:Create/ObjectDefinition/
Database/Dimensions/Dimension/Attributes/Attribute/KeyColumns/
KeyColumn/Source/TableID"/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="//xlink_01:Create">
<B>
<xsl:text>This works: </xsl:text>
<xsl:value-of select="local-name()" />
</B>
</xsl:template>
<xsl:template match="ID">
<B>
<xsl:value-of select="local-name()" />
</B>
</xsl:template>
<xsl:template match="TableID">
<B><xsl:value-of select="local-name()" /></B>
</xsl:template>
</xsl:stylesheet>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
