SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 

Pro SQL Server XML

Add to Technorati Favorites Add to Google
 

XML Puzzle

By Michael Coles in Pro SQL Server XML | 05-27-2008 9:23 PM | Categories: Filed under: , , , , ,
Rating: (not yet rated) |  Discuss | 4,410 Reads | 280 Reads in Last 30 Days

How well do you know XML?  Try your hand at the following puzzle and email me your solution at michaelcoREPLACE_THIS_WITH_THE_AT_SIGNoptonline.com. I'll randomly select two correct solutions to receive a copy of Pro SQL Server 2008 XML. I'll post the correct answer to this blog at the same time. Be sure to include your name and complete "snail mail" mailing address with your answer.

And with no further ado, here's the puzzle:

While doing some research on SQL Server 2005 full-text search a while back I ran across a sample XML full-text thesaurus file in Books Online:

<XML ID="Microsoft Search Thesaurus">
  <thesaurus xmlns="x-schema:tsSchema.xml">
    <diacritics = false/>
    <expansion>
      <sub>Internet Explorer</sub>
      <sub>IE</sub>
      <sub>IE5</sub>
    </expansion>
    <replacement>
      <pat>NT5</pat>
      <pat>W2K</pat>
      <sub>Windows 2000</sub>
    </replacement>
    <expansion>
      <sub>run</sub>
      <sub>jog</sub>
    </expansion>
  </thesaurus>
</XML>

According to the XML 1.0 Recommendation there are two problems with this XML. Can you spot the two problems?

For reference you can view the original BOL entry with this XML in it here http://msdn.microsoft.com/en-us/library/ms345186.aspx. The latest version of the XML 1.0 Recommendation is available at http://www.w3.org/TR/REC-xml/.

I'll accept contest submissions until June 20.

Comments
There are no comments on this post
Leave a Comment
Only members of SQLServerCentral may leave comments. Register now for your free account or Sign-In if you are already a member.