Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Bob's little blog with a focus on SQL Server and XML as we go [echoing voice] "Beyond Relational!"
Browse by Tags · View All
BRH 2
XML 2
#TSQL 1
TSQL 1
#SQLServer 1
SQL Server 1
parse delimited string 1
list type 1
MDS 1
SQL Server 2008 R2 1

Archive · View All
February 2011 1
May 2010 1

SQL 2008 R2 MDS Easter Egg

May 5 2010 1:56PM by wBob   

I've been having a play with SQL 2008 R2 and its new Master Data Services (MDS).  I was pleased to see it adds some additional functions when you create a new MDS database.  These include mdq.Split and mdq.RegexReplace which implement handy Regular Expression functions.  Most of these are documented at: http://msdn.microsoft.com/en-us/library/ee633712(SQL.105).aspx

I also discovered a scalar function called mdq.XmlTransform which allows you to use XSLT:

DECLARE @xml XML, @xslt XML

 

SET @xml = '<aaa>

  <n-bbb>

    <ccc />

    <n-ddd />

  </n-bbb>

  <eee>

    <fff>

      <n-ggg />

    </fff>

    <hhh />

  </eee>

</aaa>'

 

SET @xslt = '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

  <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />

  <xsl:template match="*">

    <xsl:copy>

      <xsl:apply-templates />

    </xsl:copy>

  </xsl:template>

  <xsl:template match="*[substring(name(),1,2)=''n-'']">

    <xsl:element name="n:{substring(name(),3)}" namespace="nnn-namespace">

      <xsl:apply-templates />

    </xsl:element>

  </xsl:template>

</xsl:stylesheet>'

 

SELECT @xml before, CAST( mdq.XmlTransform ( @xml, @xslt ) AS XML ) after

GO

Cool huh?  I’m hoping it’s a bit of an Easter Egg as I can’t find any documentation about it on the net.  I’m guessing it just implements the Transform method of System.Xml.Xsl but it’s still handy nonetheless.

Hopefully you enjoyed our trip as we went beyond relational via XML and XSLT on your SQL Server!

 

Tags: XML, SQL Server 2008 R2, MDS, BRH,


wBob
338 · 0% · 124
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

1  Comments  

  • What I don't understand is how to start with it? The documentation refers to Data Manager, but what is it and how (from there) to start it?

    commented on Jun 8 2010 2:34PM
    Naomi
    31 · 6% · 1776

Your Comment


Sign Up or Login to post a comment.

"SQL 2008 R2 MDS Easter Egg" rated 5 out of 5 by 1 readers
SQL 2008 R2 MDS Easter Egg , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]