Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


xsl name spaces - filtering

From: vanSkier <rod_Kane@-------.--->
To: 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>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent