<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5850531075761764705</id><updated>2012-01-14T16:14:56.718-08:00</updated><category term='Example'/><category term='Background'/><category term='XSLT'/><category term='1.5'/><category term='Editorial'/><category term='Validation'/><category term='ISO'/><category term='tutorial'/><category term='Editix'/><category term='XML Editor'/><category term='oXygen'/><category term='XML'/><category term='Schematron'/><category term='XMLSpy'/><category term='Summary'/><category term='NIEMNTE'/><title type='text'>NIEMatron</title><subtitle type='html'>Schematron help for National Information Exchange Model (NIEM) practitioners, system integrators, government agencies and public-sector vendors.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Soos Creek Consulting, LLC</name><uri>http://www.blogger.com/profile/17909666405620409896</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_yopYyjwmOF4/Ssjo5UD3oeI/AAAAAAAAAA4/_7TXUgrxTJ4/S220/Soos+Creek+Logo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-7617006540454038297</id><published>2011-03-18T11:53:00.001-07:00</published><updated>2011-03-18T11:54:35.323-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Editorial'/><title type='text'>Editorial: Tablets in the Public Sector - Part 1</title><content type='html'>&lt;p&gt;As 2011 has been termed by some in the media as &amp;quot;The Year of the Tablet,&amp;quot; (&lt;a href="http://www.foxnews.com/scitech/2011/01/03/ces-year-tablet-ipad-samsung/" target="_blank"&gt;Fox&lt;/a&gt;, &lt;a href="http://www.cio.com/article/667765/Why_2011_Is_the_Year_of_the_Tablet" target="_blank"&gt;CIO&lt;/a&gt; &amp;amp; &lt;a href="http://bits.blogs.nytimes.com/2010/12/23/year-of-the-tablet-or-the-year-of-the-ipad/" target="_blank"&gt;NYT&lt;/a&gt;) this is the first part in a series of articles meant to articulate the role Tablet PC's could potentially take in the Public Sector and how our NIEM community might react to this trend.&amp;#160; &lt;/p&gt;  &lt;p&gt;While not directly related to Schematron or XSLT, we would be remiss in ignoring modern trends in our application of these technologies.&amp;#160; The fact is, that unless our tools and technologies are adapted to support these trends, they risk being left behind.&lt;/p&gt;  &lt;p&gt;This first article will focus on the Tablet and the various roles it can potentially take in the Public Sector.&amp;#160; Some in the media have simply divided the device's role into two oversimplified categories of Content Creation and Content Consumption.&amp;#160; While it is true, devices of any type can do these two things to differing degrees, it is probably easier to understand Tablet technologies in terms of actual public sector environment use cases.&lt;/p&gt;  &lt;h4&gt;In the Boardroom&lt;/h4&gt;  &lt;p&gt;In meetings the Tablet most often replaces the paper meeting handouts.&amp;#160; In one large city they estimated that over $1m per year could be saved in paper and printing costs by simply eliminating meeting handouts in favor of electronic meeting materials.&amp;#160; An electronic medium also makes it easy to store, preserve and reexamine materials presented at a later date or by those not who were unable to physically attend the meeting.&lt;/p&gt;  &lt;p&gt;An example of where this use case is already becoming a reality is in the NLETS board, where each of the board members is issued a tablet upon which they are provided meeting materials and access to any other critical information prior to and during each meeting.&lt;/p&gt;  &lt;p&gt;It is also possible for the Tablet to take the role of the &amp;quot;notebook&amp;quot; or the medium where one takes notes about the meeting, however more often than not, the lack of a stylus or even keyboard (barring separate accessories) for rapid data entry makes this impractical at this point in time.&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="400"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;         &lt;p align="center"&gt;&lt;em&gt;Current Advantages&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="200"&gt;         &lt;p align="center"&gt;&lt;em&gt;Current Disadvantages&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;-&lt;font size="1"&gt; Size &amp;amp; Weight            &lt;br /&gt;- Paper Cost Savings             &lt;br /&gt;- Ease of Later Referencing             &lt;br /&gt;- Ease of Real-Time Update&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;font size="1"&gt;- Poor Annotation Capabilities&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;h4 align="left"&gt;In the Courtroom&lt;/h4&gt;  &lt;p&gt;There are a number of situations where paper was the predominant medium for hundreds of years only to very recently be replaced with more electronic options.&amp;#160; In the late 1990's, attorney's began to adopt Notebook PC's yet they have never been fully accepted in that environment.&amp;#160; Many courtrooms were never built with a PC in mind therefore the lack of power outlets, desk space and network connectivity quickly became impediments.&amp;#160; &lt;/p&gt;  &lt;p&gt;With the advent of Tablet technology, there is a renewed interest in this technology by defense and prosecution alike.&amp;#160; An example trial was recently documented by the &lt;a href="http://www.maclitigator.com/2010/04/24/ipad-at-trial/" target="_blank"&gt;Mac Litigator&lt;/a&gt; where it highlighted the use of an Tablet in a four day Jury Trial.&amp;#160; Many of the issues with a laptop are overcome by the use of an unobtrusive, always connected, long-lasting Tablet.&amp;#160; &lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="402"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;         &lt;p align="center"&gt;&lt;em&gt;Current Advantages&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="200"&gt;         &lt;p align="center"&gt;&lt;em&gt;Current Disadvantages&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;-&lt;font size="1"&gt; Size &amp;amp; Desk Footprint           &lt;br /&gt;- Paper Cost Savings            &lt;br /&gt;- Battery Life            &lt;br /&gt;- Real-Time Updates            &lt;br /&gt;- Real-Time Reference&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;font size="1"&gt;-&lt;font size="1"&gt; Poor Data Input Capabilities&lt;/font&gt;            &lt;br /&gt;- Possible Courtroom Distraction            &lt;br /&gt;- Enterprise Security Risk&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;h4&gt;In the Field &lt;/h4&gt;  &lt;p&gt;The public sector employs a large number of individuals involved in on-site investigations of various kinds.&amp;#160; Whether it is the city building inspector, a fire marshal or a police detective, they all have similar needs to gather and process data in the field.&amp;#160; For years now, investigators of this kind have been using laptop computers to address this need, however this technology has always been relegated to the car or the office as it would get in the way of the investigator at the work site.&amp;#160; Tablets seem to fit this niche well as their size, weight and connectivity is better suited to the job.&lt;/p&gt;  &lt;p&gt;Some agencies are already beginning to investigate and adopt Tablet technology in this manner.&amp;#160; The Knox County Sheriff replaced a number of their detectives' laptops with Tablets as described by an &lt;a href="http://www.nlets.org/press/tapping-in-to-tablets" target="_blank"&gt;article on the NLETS website&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;Wireless Tablet technology coupled with GPS, maps and satellite imagery makes Tablets extremely relevant to those public sector employees working in the construction field.&amp;#160; With a Tablet, a building inspector or DOT foreman can walk onto a job site and determine where there may be troubles quickly and easily.&amp;#160; These can also give real-time access to building codes and municipal ordnances as well as architectural images, plans and blueprints.&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="402"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;         &lt;p align="center"&gt;&lt;em&gt;Current Advantages&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="200"&gt;         &lt;p align="center"&gt;&lt;em&gt;Current Disadvantages&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;- &lt;font size="1"&gt;Size &amp;amp; Weight            &lt;br /&gt;- Real-Time Reference            &lt;br /&gt;- Real-Time Transmission            &lt;br /&gt;- Hardware Price Point&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;font size="1"&gt;- Poor Data Input Capabilities           &lt;br /&gt;- Lack of &amp;quot;Rugged&amp;quot; Models            &lt;br /&gt;- Enterprise Security Risks&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;h4&gt;In the Classroom&lt;/h4&gt;  &lt;p&gt;It seems like whenever the topic of Tablets or eBooks is brought up, a spotlight is placed on the classroom and the typical college student hefting around hundreds of pounds worth of textbooks.&amp;#160; While on the surface and in 10 second sound bites, this makes sense; the classroom setting has experienced significant struggles making Tablets and eBooks a reality in the classroom.&amp;#160; A recent &lt;a href="http://chronicle.com/article/iPads-for-College-Classrooms-/126681/" target="_blank"&gt;article by the Chronicle for Higher Learning&lt;/a&gt; points out a number of the difficulties experienced across several different institutions.&amp;#160; &lt;/p&gt;  &lt;p&gt;Regardless of the problems currently being experienced, as the they are addressed, the classroom is a very likely place for Tablet technology to take a strong future foothold.&amp;#160; As a &lt;a href="http://www.teleread.com/paul-biba/trinity-college-melbourne-releases-ipad-usage-report/" target="_blank"&gt;Melbourne Trinity College study&lt;/a&gt; points out, even with the disadvantages, the usage of Tablets are still expected to increase at the University level in the upcoming years. &lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="402"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="200"&gt;         &lt;p align="center"&gt;&lt;em&gt;Current Advantages&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="200"&gt;         &lt;p align="center"&gt;&lt;em&gt;Current Disadvantages&lt;/em&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="200"&gt;-&lt;font size="1"&gt; Real-Time Learning Feedback           &lt;br /&gt;- Size &amp;amp; Weight            &lt;br /&gt;- Battery Life            &lt;br /&gt;- Hardware Price Point&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="200"&gt;&lt;font size="1"&gt;- eTextbook Prices Still High           &lt;br /&gt;- Poor Annotation Capabilities            &lt;br /&gt;- Potential Classroom Distraction            &lt;br /&gt;&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;   &lt;hr /&gt;&lt;/p&gt;    &lt;p&gt;In summary, Tablets can be seen and used in a number of environments within the public sector and one should not be surprised as they begin to become less of a consumer toy and more of an industry tool.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font size="1"&gt;Please bear in mind that we fully acknowledge that the editorial opinions stated in the article above are based on industry generalizations and we fully understand that for every generalization or rule there is an exception.&amp;#160; &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-7617006540454038297?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/7617006540454038297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2011/03/editorial-tablets-in-public-sector-part.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/7617006540454038297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/7617006540454038297'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2011/03/editorial-tablets-in-public-sector-part.html' title='Editorial: Tablets in the Public Sector - Part 1'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-2606953490767884878</id><published>2010-10-29T11:06:00.001-07:00</published><updated>2010-10-29T11:06:51.747-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Summary'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='Background'/><category scheme='http://www.blogger.com/atom/ns#' term='Editorial'/><title type='text'>Editorial: Growing Support for Asynchronous Transactions</title><content type='html'>&lt;p&gt;It's always exciting to see a prediction come true. . .especially when its one of your own.&amp;#160; For a number of years now it has been obvious that the simple synchronous web services taught in books and college courses were never going to be sufficient enough to support the highly complex transactions required in the real world.&amp;#160; In particular, transactions which require two-phase validation, such as those that leverage Schematron in addition to simple XML Schema validation.&lt;/p&gt;  &lt;p&gt;It appears that others are leaning towards agreeing with this same premise.&amp;#160; Microsoft is now publishing its Visual Studio Async in order to better handle these sorts of highly complex transactions which require higher network latency than your traditional synchronous request/response web service.&amp;#160; &lt;a href="http://www.infoworld.com/d/developer-world/microsoft-hails-async-programming-visual-basic-c-588" target="_blank"&gt;Infoworld has a good article here&lt;/a&gt; that describes Microsoft's adoption of this new trend.&lt;/p&gt;  &lt;p&gt;While not endorsing any specific platform, Microsoft's development tools have historically been a great indicator of market trends.&amp;#160; This latest addition proves to be a good sign that the industry is headed towards better support of this highly complex transaction processing world in which we live.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-2606953490767884878?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/2606953490767884878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2010/10/editorial-growing-support-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/2606953490767884878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/2606953490767884878'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2010/10/editorial-growing-support-for.html' title='Editorial: Growing Support for Asynchronous Transactions'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-7757956125462914096</id><published>2010-10-20T10:33:00.000-07:00</published><updated>2010-10-22T10:01:28.322-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>XSLT: Transform XML into nc:ContactInformation Structure</title><content type='html'>&lt;p&gt;This is a short post to show how to leverage XSLT to convert a simple and generic XML file into NIEM-conformant XML as it pertains to the nc:ContactInformation block.&amp;#160; &lt;/p&gt;  &lt;p&gt;This is a very common situation where a &amp;quot;non-NIEM&amp;quot; data stream is received and needs to be converted to a conformant structure.&amp;#160; Take the following sample non-NIEM XML instance:&lt;/p&gt;  &lt;pre class="brush: xml"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;     
&amp;lt;SomeBatchOfStuff&amp;gt;
   &amp;lt;Person&amp;gt;
       &amp;lt;Name&amp;gt;John Doe&amp;lt;/Name&amp;gt;
       &amp;lt;PhoneNumber&amp;gt;212-111-2222&amp;lt;/PhoneNumber&amp;gt;
   &amp;lt;/Person&amp;gt;
   &amp;lt;Person&amp;gt;
       &amp;lt;Name&amp;gt;Sally Smith&amp;lt;/Name&amp;gt;
       &amp;lt;PhoneNumber&amp;gt;212-333-4444&amp;lt;/PhoneNumber&amp;gt;
   &amp;lt;/Person&amp;gt;
&amp;lt;/SomeBatchOfStuff&amp;gt;&lt;/pre&gt;

&lt;p&gt;If this very logical structure needed to be converted into nc:Person and nc:ContactInformatoin elements (with an nc:PersonContactInformationAssociation object to link the two together), the following XSLT could be used:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;     
&amp;lt;xsl:stylesheet  xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot; xmlns:xs=&amp;quot;http://www.w3.org/2001/XMLSchema&amp;quot; xmlns:ns0=&amp;quot;SomeNonConformantDocumentNamespace&amp;quot; version=&amp;quot;1.0&amp;quot; exclude-result-prefixes=&amp;quot;xs&amp;quot;&amp;gt;
    &amp;lt;xsl:output method=&amp;quot;xml&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; indent=&amp;quot;yes&amp;quot;/&amp;gt;
    &amp;lt;xsl:template match=&amp;quot;/&amp;quot;&amp;gt;
        &amp;lt;xsl:variable name=&amp;quot;var1_instance_InputSchema&amp;quot; select=&amp;quot;.&amp;quot;/&amp;gt;
        &amp;lt;MyNIEMConformantDocument xmlns=&amp;quot;MyNIEMDocumentNamespace&amp;quot; xmlns:i=&amp;quot;http://niem.gov/niem/appinfo/2.0&amp;quot; xmlns:nc=&amp;quot;http://niem.gov/niem/niem-core/2.0&amp;quot; xmlns:niem-xsd=&amp;quot;http://niem.gov/niem/proxy/xsd/2.0&amp;quot; xmlns:s=&amp;quot;http://niem.gov/niem/structures/2.0&amp;quot;&amp;gt;
            &amp;lt;!-- Loop through the Persons and create an NIEM Conformant Person --&amp;gt;
            &amp;lt;xsl:for-each select=&amp;quot;$var1_instance_InputSchema/SomeBatchOfStuff/Person&amp;quot;&amp;gt;
                &amp;lt;xsl:variable name=&amp;quot;NonConformantPerson&amp;quot; select=&amp;quot;.&amp;quot;/&amp;gt;
                &amp;lt;nc:Person&amp;gt;
                    &amp;lt;xsl:attribute name=&amp;quot;s:id&amp;quot;&amp;gt;
                        &amp;lt;xsl:value-of select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;
                    &amp;lt;/xsl:attribute&amp;gt;
                    &amp;lt;nc:PersonName&amp;gt;
                        &amp;lt;xsl:for-each select=&amp;quot;$NonConformantPerson/Name&amp;quot;&amp;gt;
                            &amp;lt;nc:PersonFullName&amp;gt;
                                &amp;lt;xsl:value-of select=&amp;quot;string(.)&amp;quot;/&amp;gt;
                            &amp;lt;/nc:PersonFullName&amp;gt;
                        &amp;lt;/xsl:for-each&amp;gt;
                    &amp;lt;/nc:PersonName&amp;gt;
                &amp;lt;/nc:Person&amp;gt;
            &amp;lt;/xsl:for-each&amp;gt;
            
            &amp;lt;!-- Loop through the phone numbers and create a NIEM Conformant Contact Information --&amp;gt;
            &amp;lt;xsl:for-each select=&amp;quot;$var1_instance_InputSchema/SomeBatchOfStuff/Person/PhoneNumber&amp;quot;&amp;gt;
                &amp;lt;nc:ContactInformation&amp;gt;
                    &amp;lt;xsl:attribute name=&amp;quot;s:id&amp;quot;&amp;gt;
                        &amp;lt;xsl:value-of select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;
                    &amp;lt;/xsl:attribute&amp;gt;
                    &amp;lt;nc:ContactTelephoneNumber&amp;gt;
                        &amp;lt;nc:FullTelephoneNumber&amp;gt;
                            &amp;lt;nc:TelephoneNumberFullID&amp;gt;
                                &amp;lt;xsl:value-of select=&amp;quot;string(.)&amp;quot;/&amp;gt;
                            &amp;lt;/nc:TelephoneNumberFullID&amp;gt;
                        &amp;lt;/nc:FullTelephoneNumber&amp;gt;
                    &amp;lt;/nc:ContactTelephoneNumber&amp;gt;
                &amp;lt;/nc:ContactInformation&amp;gt;
            &amp;lt;/xsl:for-each&amp;gt;
            
            &amp;lt;!-- Loop through the phone numbers and create a NIEM Conformant Contact Information Association --&amp;gt;
            &amp;lt;xsl:for-each select=&amp;quot;$var1_instance_InputSchema/SomeBatchOfStuff/Person&amp;quot;&amp;gt;
                &amp;lt;nc:PersonContactInformationAssociation&amp;gt;
                    &amp;lt;nc:PersonReference&amp;gt;
                    &amp;lt;xsl:attribute name=&amp;quot;s:ref&amp;quot;&amp;gt;
                        &amp;lt;xsl:value-of select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;
                    &amp;lt;/xsl:attribute&amp;gt;
                    &amp;lt;/nc:PersonReference&amp;gt;
                    &amp;lt;nc:ContactInformationReference&amp;gt;
                        &amp;lt;xsl:attribute name=&amp;quot;s:ref&amp;quot;&amp;gt;
                            &amp;lt;xsl:value-of select=&amp;quot;generate-id(./PhoneNumber)&amp;quot;/&amp;gt;
                        &amp;lt;/xsl:attribute&amp;gt;
                    &amp;lt;/nc:ContactInformationReference&amp;gt;
                &amp;lt;/nc:PersonContactInformationAssociation&amp;gt;
            &amp;lt;/xsl:for-each&amp;gt;
        &amp;lt;/MyNIEMConformantDocument&amp;gt;
    &amp;lt;/xsl:template&amp;gt;                    
&amp;lt;/xsl:stylesheet&amp;gt;&lt;/pre&gt;

&lt;p&gt;The XSLT heavily leverages the &lt;a href="http://niematron.blogspot.com/2010/02/xslt-using-generate-id-function.html" target="_blank"&gt;XSLT generate-id() function&lt;/a&gt; in order to work its magic and result in the following NIEM-conformant XML file:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; ?&amp;gt;   
&amp;lt;MyNIEMConformantDocument xmlns=&amp;quot;MyNIEMDocumentNamespace&amp;quot; xmlns:i=&amp;quot;http://niem.gov/niem/appinfo/2.0&amp;quot; xmlns:nc=&amp;quot;http://niem.gov/niem/niem-core/2.0&amp;quot; xmlns:niem-xsd=&amp;quot;http://niem.gov/niem/proxy/xsd/2.0&amp;quot; xmlns:s=&amp;quot;http://niem.gov/niem/structures/2.0&amp;quot; xmlns:ns0=&amp;quot;SomeNonConformantDocumentNamespace&amp;quot;&amp;gt;
   &amp;lt;nc:Person s:id=&amp;quot;d0e3&amp;quot;&amp;gt;
      &amp;lt;nc:PersonName&amp;gt;
         &amp;lt;nc:PersonFullName&amp;gt;John Doe&amp;lt;/nc:PersonFullName&amp;gt;
      &amp;lt;/nc:PersonName&amp;gt;
   &amp;lt;/nc:Person&amp;gt;
   &amp;lt;nc:Person s:id=&amp;quot;d0e12&amp;quot;&amp;gt;
      &amp;lt;nc:PersonName&amp;gt;
         &amp;lt;nc:PersonFullName&amp;gt;Sally Smith&amp;lt;/nc:PersonFullName&amp;gt;
      &amp;lt;/nc:PersonName&amp;gt;
   &amp;lt;/nc:Person&amp;gt;
   &amp;lt;nc:ContactInformation s:id=&amp;quot;d0e8&amp;quot;&amp;gt;
      &amp;lt;nc:ContactTelephoneNumber&amp;gt;
         &amp;lt;nc:FullTelephoneNumber&amp;gt;
            &amp;lt;nc:TelephoneNumberFullID&amp;gt;212-111-2222&amp;lt;/nc:TelephoneNumberFullID&amp;gt;
         &amp;lt;/nc:FullTelephoneNumber&amp;gt;
      &amp;lt;/nc:ContactTelephoneNumber&amp;gt;
   &amp;lt;/nc:ContactInformation&amp;gt;
   &amp;lt;nc:ContactInformation s:id=&amp;quot;d0e17&amp;quot;&amp;gt;
      &amp;lt;nc:ContactTelephoneNumber&amp;gt;
         &amp;lt;nc:FullTelephoneNumber&amp;gt;
            &amp;lt;nc:TelephoneNumberFullID&amp;gt;212-333-4444&amp;lt;/nc:TelephoneNumberFullID&amp;gt;
         &amp;lt;/nc:FullTelephoneNumber&amp;gt;
      &amp;lt;/nc:ContactTelephoneNumber&amp;gt;
   &amp;lt;/nc:ContactInformation&amp;gt;
   &amp;lt;nc:PersonContactInformationAssociation&amp;gt;
      &amp;lt;nc:PersonReference s:ref=&amp;quot;d0e3&amp;quot;/&amp;gt;
      &amp;lt;nc:ContactInformationReference s:ref=&amp;quot;d0e8&amp;quot;/&amp;gt;
   &amp;lt;/nc:PersonContactInformationAssociation&amp;gt;
   &amp;lt;nc:PersonContactInformationAssociation&amp;gt;
      &amp;lt;nc:PersonReference s:ref=&amp;quot;d0e12&amp;quot;/&amp;gt;
      &amp;lt;nc:ContactInformationReference s:ref=&amp;quot;d0e17&amp;quot;/&amp;gt;
   &amp;lt;/nc:PersonContactInformationAssociation&amp;gt;
&amp;lt;/MyNIEMConformantDocument&amp;gt;&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-7757956125462914096?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/7757956125462914096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2010/10/sample-transform-xml-into.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/7757956125462914096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/7757956125462914096'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2010/10/sample-transform-xml-into.html' title='XSLT: Transform XML into nc:ContactInformation Structure'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-9133694611241486655</id><published>2010-03-31T11:39:00.001-07:00</published><updated>2010-10-20T15:17:07.319-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><title type='text'>Schematron: Supporting Form Validation in a Data Validation World</title><content type='html'>&lt;p&gt;NIEM is for all intents and purposes a highly object-oriented data model which may, or may not be used by form entry tools at the time of data capture.&amp;#160; While this has enormous benefits, it can be detrimental if one wants to use Schematron for BOTH form and data validation in conjunction with NIEM.&lt;/p&gt;  &lt;p&gt;In order to properly support form validation, source systems will often want to know exactly which field caused an error during the processing of business rules surrounding a form. While in many systems, the map between the source fields and the NIEM may be readily available, in cases where it is not or processing speed is critical, the data validation engine should be capable of furnishing this information back to the calling system.&lt;/p&gt;  &lt;p&gt;Lets take the example of a citation data capture tool with the following example data entry UI:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_hc4bbeOuQpk/S7OWw4EpnpI/AAAAAAAACuw/e4RrUewovWM/s1600-h/image%5B2%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_hc4bbeOuQpk/S7OWxU5lzlI/AAAAAAAACu0/h5RAzVh9PGg/image_thumb.png?imgmax=800" height="102" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;NIEM supports the passing of a “footnote” on every element called the nc:Metadata element.&amp;#160; &lt;a href="http://www.ncsconline.org/niemwayfarer/showelement.php?element=nc:Metadata" target="_blank"&gt;nc:Metadata&lt;/a&gt; is a complex data type that in turn includes an element to store the source-system’s field name called &lt;a href="http://www.ncsconline.org/niemwayfarer/showelement.php?element=nc:SourceIDText&amp;amp;path=nc:Metadata" target="_blank"&gt;nc:SourceIDText&lt;/a&gt;.&amp;#160; The NIEM conformant XML instance to pass this would look something like the following:&lt;/p&gt;  &lt;pre class="brush: xml"&gt;&amp;lt;ns:CitationBatchDocument&amp;gt; 
  ...
  ...
  ...
  &amp;lt;ns:Citation&amp;gt; 
    ...
    ...
    &amp;lt;!-- Citation Number --&amp;gt; 
    &amp;lt;nc:ActivityIdentification&amp;gt; 
      &amp;lt;nc:IdentificationID s:metadata=”M1”&amp;gt;ABC123&amp;lt;/nc:IdentificationID&amp;gt; 
    &amp;lt;/nc:ActivityIdentification&amp;gt; 
    &amp;lt;!-- Citation Date --&amp;gt; 
    &amp;lt;nc:ActivityDate&amp;gt; 
      &amp;lt;nc:Date s:metadata=”M2”&amp;gt;2002-05-30&amp;lt;/nc:Date&amp;gt; 
    &amp;lt;/nc:ActivityDate&amp;gt; 
    ...
    ...
  &amp;lt;/ns:Citation&amp;gt; 
  ...
  ...
  ...
  &amp;lt;nc:Metadata s:id=”M1”&amp;gt; 
    &amp;lt;nc:SourceIDText&amp;gt;CITE_NUM&amp;lt;/nc:SourceIDText&amp;gt; 
  &amp;lt;/nc:Metadata&amp;gt; 
  &amp;lt;nc:Metadata s:id=”M2”&amp;gt; 
    &amp;lt;nc:SourceIDText&amp;gt;CITE_DATE&amp;lt;/nc:SourceIDText&amp;gt; 
  &amp;lt;/nc:Metadata&amp;gt; 
  ...
  ...
&amp;lt;/ &amp;lt;ns:CitationBatchDocument&amp;gt;&lt;/pre&gt;

&lt;p&gt;While passing the field name to the business rules engine is 1/2 the battle, one must also return the field name with any errors the data validation engine runs into.&amp;#160; An example Schematron code snippet to support returning the field name to the source system in the diagnostics would appear something like the following:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;...
...
...
&amp;lt;pattern id=&amp;quot;eBasicCiteRules&amp;quot;&amp;gt;
  &amp;lt;title&amp;gt;Check the minimum basic citation rules.&amp;lt;/title&amp;gt;
  &amp;lt;rule context=&amp;quot;cite:CitationBatchDocument/cite:Citation&amp;quot;&amp;gt;
    &amp;lt;let name=&amp;quot;CiteNumSource&amp;quot; value=&amp;quot;/cite:CitationBatchDocument
                                     /nc:Metadata [@s:id = current()
                                     /nc:ActivityIdentification
                                     /nc:IdentificationID/@s:metadata]
                                     /nc:SourceIDText&amp;quot;/&amp;gt;
    &amp;lt;assert test=&amp;quot;nc:ActivityIdentification/nc:IdentificationID and
        string-length(normalize-space (nc:ActivityIdentification/nc:IdentificationID))
        &amp;amp;gt; 0&amp;quot; diagnostics=&amp;quot;eCiteIdDiag&amp;quot;&amp;gt;
            Citations must have a Citation Number.
    &amp;lt;/assert&amp;gt;
  &amp;lt;/rule&amp;gt;
&amp;lt;/pattern&amp;gt;
...
...
...
&amp;lt;diagnostics&amp;gt;
  &amp;lt;diagnostic id=&amp;quot;eCiteIdDiag&amp;quot;&amp;gt;
    |&amp;lt;value-of select=”@CiteNumSource”/&amp;gt;|
    Some technical error description goes here (e.g. XPath to error).
  &amp;lt;/diagnostic&amp;gt;
&amp;lt;/diagnostics&amp;gt;&lt;/pre&gt;

&lt;p&gt;What this will yield to the end user is the following error message:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;Citations must have a Citation Number.&lt;/pre&gt;

&lt;p&gt;What the source system will also receive in the case of any errors would look like the following:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;|CITE_NUM| Some technical error description goes here (e.g. XPath to error).&lt;/pre&gt;

&lt;p&gt;The field name passed back could then be used by the source system in helping guide end users to complete the form correctly (e.g. jump to the first field with an error).&amp;#160; In the above example, simple “bar” delimiters are being used (|) but this could of course be changed to proper XML elements through the use of &amp;amp;gt; and $lt; instead.&lt;/p&gt;

&lt;p&gt;&lt;font size="1"&gt;&lt;em&gt;EDITED 2010-04-01: Adding current() to XPath in Schematron code snippet.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-9133694611241486655?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/9133694611241486655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2010/03/schematron-supporting-form-validation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/9133694611241486655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/9133694611241486655'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2010/03/schematron-supporting-form-validation.html' title='Schematron: Supporting Form Validation in a Data Validation World'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_hc4bbeOuQpk/S7OWxU5lzlI/AAAAAAAACu0/h5RAzVh9PGg/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-3145097532325891261</id><published>2010-02-11T10:35:00.001-08:00</published><updated>2010-10-20T16:05:25.039-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>XSLT: Using the generate-id() Function</title><content type='html'>&lt;p&gt;NIEM utilizes &lt;font color="#0000ff" face="Courier New"&gt;ID&lt;/font&gt; and &lt;font color="#0000ff" face="Courier New"&gt;IDREF&lt;/font&gt; elements heavily throughout the data standard.&amp;#160; While this is native to the W3C specification for XML Schema files (.XSD) and in no way “unique” to NIEM, it is used much more heavily in NIEM than in many other national and international standards.&amp;#160; &lt;/p&gt;  &lt;p&gt;When converting or transforming to NIEM from another data standard, it quickly becomes necessary to generate unique identifiers in a common and consistent manner for key “noun” elements such as Persons, Places, Vehicles, and the like.&amp;#160; A number of home-grown functions are scattered around the Internet to do this, however a native XSLT function already exists to perform this task called &lt;font color="#0000ff" face="Courier New"&gt;generate-id()&lt;/font&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;Say the following non-NIEM-conformant XML payload is provided to a system processing citation data:&lt;/p&gt;  &lt;pre class="brush: xml"&gt;&amp;lt;CitationBatch&amp;gt;
  &amp;lt;Citation&amp;gt;
    &amp;lt;CitationNumber&amp;gt;123456&amp;lt;/CitationNumber&amp;gt;
    &amp;lt;CitationDefendant&amp;gt;
      &amp;lt;FirstName&amp;gt;John&amp;lt;/FirstName&amp;gt;
      &amp;lt;LastName&amp;gt;Doe&amp;lt;/LastName&amp;gt;
      &amp;lt;PhoneNumber&amp;gt;123-456-7890&amp;lt;/PhoneNumber&amp;gt;
    &amp;lt;/CitationDefendant&amp;gt;
    &amp;lt;!-- Remainder Omitted --&amp;gt;
  &amp;lt;/Citation&amp;gt;
&amp;lt;CitationBatch&amp;gt;
&lt;/pre&gt;

&lt;p&gt;Within NIEM the &lt;font color="#0000ff" face="Courier New"&gt;&amp;lt;CitationDefendant&amp;gt;&lt;/font&gt; element above is termed the &lt;font color="#0000ff" face="Courier New"&gt;&amp;lt;j:CitationSubject&amp;gt;&lt;/font&gt; and includes a &lt;font color="#0000ff" face="Courier New"&gt;&amp;lt;nc:RoleOfPersonReference&amp;gt;&lt;/font&gt; rather than embedding all person information as child elements within the citation.&amp;#160; Additionally, the phone number for any given person is contained within a &lt;font color="#0000ff" face="Courier New"&gt;&amp;lt;nc:ContactInformation&amp;gt;&lt;/font&gt; element.&amp;#160; &lt;/p&gt;

&lt;p&gt;The XSLT &lt;font color="#0000ff" face="Courier New"&gt;generate-id()&lt;/font&gt; function accepts a specific xml node as its input parameter and will consistently provide a unique ID for that node no matter where or how many times it is called from within the XSLT.&amp;#160; For example, take the following XSLT snippets:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;&amp;lt;xsl:for-each select=&amp;quot;$xmlInputFile/CitationBatch/Citation&amp;quot;&amp;gt;
        &amp;lt;xsl:variable name=&amp;quot;xmlCiteNode&amp;quot; select=&amp;quot;.&amp;quot;/&amp;gt;
        &amp;lt;j:CitationSubject&amp;gt;
            &amp;lt;nc:RoleOfPersonReference&amp;gt;
                &amp;lt;xsl:attribute name=&amp;quot;s:ref&amp;quot;&amp;gt;
                    &amp;lt;xsl:value-of select=&amp;quot;generate-id($xmlCiteNode/CitationDefendant)&amp;quot;/&amp;gt;
                &amp;lt;/xsl:attribute&amp;gt;
            &amp;lt;/nc:RoleOfPersonReference&amp;gt;
        &amp;lt;/j:CitationSubject&amp;gt;
    &amp;lt;/xsl:for-each&amp;gt;
    ....
    ....
    ....
    &amp;lt;xsl:for-each select=&amp;quot;$xmlInputFile/CitationBatch/Citation/CitationDefendant&amp;quot;&amp;gt;
        &amp;lt;xsl:variable name=&amp;quot;xmlCiteSubjectNode&amp;quot; select=&amp;quot;.&amp;quot;/&amp;gt;
        &amp;lt;nc:Person&amp;gt;
            &amp;lt;xsl:attribute name=&amp;quot;s:id&amp;quot;&amp;gt;
                &amp;lt;xsl:value-of select=&amp;quot;generate-id($xmlCiteSubjectNode)&amp;quot;/&amp;gt;
            &amp;lt;/xsl:attribute&amp;gt;
        &amp;lt;/nc:Person&amp;gt;
    &amp;lt;/xsl:for-each&amp;gt;
    ....
    ....&lt;/pre&gt;

&lt;p&gt;Even though the &lt;font color="#0000ff" face="Courier New"&gt;generate-id()&lt;/font&gt; function is called in two places within the transform, using two different variable names, the function will return the same exact yet unique ID as the XPath for both variables resolve to the same element in the input schema.&amp;#160; The output of the above would appear as the following:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;....
....
&amp;lt;j:CitationSubject&amp;gt;
    &amp;lt;nc:RoleOfPersonReference s:ref=&amp;quot;d0e8&amp;quot;/&amp;gt;
&amp;lt;/j:CitationSubject&amp;gt;
....
....
&amp;lt;nc:Person s:id=&amp;quot;d0e8&amp;quot;/&amp;gt;&lt;/pre&gt;

&lt;p&gt;This powerful function within XSLT dramatically ease &lt;font color="#0000ff" face="Courier New"&gt;ID&lt;/font&gt; and &lt;font color="#0000ff" face="Courier New"&gt;IDREF&lt;/font&gt; usage within XML and makes implementation of transforms to NIEM relatively trivial.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-3145097532325891261?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/3145097532325891261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2010/02/xslt-using-generate-id-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/3145097532325891261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/3145097532325891261'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2010/02/xslt-using-generate-id-function.html' title='XSLT: Using the generate-id() Function'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-1910940544410881987</id><published>2010-01-11T15:46:00.001-08:00</published><updated>2010-10-20T16:09:35.832-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='XSLT'/><title type='text'>XSLT: Transform Date and Time Elements into nc:DateTime</title><content type='html'>&lt;p&gt;While NIEM practitioners tend to merge Date and Time elements together into single &lt;font color="#0000ff" face="Courier New"&gt;nc:DateTime&lt;/font&gt; elements, we often find that the outside world separates these into two fields in their XML data packages.&amp;#160; For example, if someone were to use Java XForms or Microsoft InfoPath to capture data in an electronic form, it is common to separate these out into their component parts.&lt;/p&gt;  &lt;p&gt;For example, assume a NIBRS report form exists and has discrete date and time values.&amp;#160; Using XSLT to merge these is quite simple and can be done using the &lt;font color="#0000ff" face="Courier New"&gt;concat()&lt;/font&gt; function as show here:&lt;/p&gt;    &lt;pre class="brush: xml"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&amp;lt;xsl:stylesheet 
    version=&amp;quot;1.0&amp;quot; 
    xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;
    xmlns:ns=&amp;quot;SomeNibrsOffenseReportNamespace&amp;quot;
    exclude-result-prefixes=&amp;quot;ns&amp;quot;&amp;gt;
    
    &amp;lt;xsl:output method=&amp;quot;xml&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; indent=&amp;quot;yes&amp;quot;/&amp;gt;
    
    &amp;lt;xsl:template match=&amp;quot;/&amp;quot;&amp;gt;
        &amp;lt;xsl:variable name=&amp;quot;sInputSchema&amp;quot; select=&amp;quot;.&amp;quot;/&amp;gt;
        
        &amp;lt;OffenseReportDocument xmlns=&amp;quot;SomeNiemOffenseReportNamespace&amp;quot; xmlns:j=&amp;quot;http://niem.gov/niem/domains/jxdm/4.0&amp;quot; xmlns:nc=&amp;quot;http://niem.gov/niem/niem-core/2.0&amp;quot;&amp;gt;
          &amp;lt;j:Offense&amp;gt;
            &amp;lt;nc:ActivityDate&amp;gt;
              &amp;lt;nc:DateTime&amp;gt;
                &amp;lt;xsl:value-of select=&amp;quot;concat(string($sInputSchema/ns:NibrsForm/ns:OffenseDate), &amp;#039;T&amp;#039;, string(sInputSchema/ns:NibrsForm/ns:OffenseTime))&amp;quot;/&amp;gt;
              &amp;lt;/nc:DateTime&amp;gt;
            &amp;lt;/nc:ActivityDate&amp;gt;
          &amp;lt;/j:Offense&amp;gt;
        &amp;lt;/OffenseReportDocument&amp;gt;
    &amp;lt;/xsl:template&amp;gt;
&amp;lt;/xsl:stylesheet&amp;gt;&lt;/pre&gt;

&lt;p&gt;In the above example, the &lt;font color="#0000ff" face="Courier New"&gt;concat()&lt;/font&gt; function allows us to merge the date (e.g. ‘2010-01-01’), the letter ‘T’, and the time (e.g. ‘12:00:00’) into a single string which in turn can be evaluated as a &lt;font color="#0000ff" face="Courier New"&gt;nc:dateTime&lt;/font&gt; element.&amp;#160; &lt;/p&gt;

&lt;p&gt;&lt;font size="1"&gt;&lt;em&gt;1-13-10 – Edit for typo&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-1910940544410881987?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/1910940544410881987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2010/01/xslt-transform-date-and-time-elements.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/1910940544410881987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/1910940544410881987'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2010/01/xslt-transform-date-and-time-elements.html' title='XSLT: Transform Date and Time Elements into nc:DateTime'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-8845764211688066704</id><published>2010-01-07T15:52:00.001-08:00</published><updated>2010-10-20T16:14:33.159-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><title type='text'>Schematron: Using the Number() Function Versus Casting</title><content type='html'>&lt;p&gt;There are situations where it becomes necessary to test the value of a numeric element to ensure it meets some minimum or maximum value.&amp;#160; As Schematron is capable of treating any element as a string, it is generally a best practice to cast the value to a numeric data type first.&amp;#160; &lt;/p&gt;  &lt;p&gt;For example, on a citation or a complaint document it may be necessary to check the fine or bail amount to ensure it is greater than zero.&amp;#160; This could be done with the following Schematron assert statement:&lt;/p&gt;    &lt;pre class="brush: xml"&gt;&amp;lt;assert test=&amp;quot;xsd:double(nc:ObligationDueAmount) &amp;amp;gt; 0&amp;quot;&amp;gt;
  Bail amount may not be less than zero.
&amp;lt;/assert&amp;gt;&lt;/pre&gt;

&lt;p&gt;While the above would work when a value is provided in the &lt;font color="#0000ff" face="Courier New"&gt;nc:ObligationDueAmount&lt;/font&gt; element, an XSLT error would be raised in the following circumstances:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Value is blank or null 
    &lt;ul&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;font color="#0000ff" size="1" face="Courier New"&gt;&amp;lt;nc:ObligationDueAmount&amp;gt;&amp;lt;/nc:ObligationDueAmount&amp;gt;&lt;/font&gt; &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/ul&gt;
  &lt;/li&gt;

  &lt;li&gt;Value is omitted 
    &lt;ul&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;font color="#0000ff" size="1" face="Courier New"&gt;&amp;lt;nc:ObligationDueAmount/&amp;gt;&lt;/font&gt; &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/ul&gt;
  &lt;/li&gt;

  &lt;li&gt;Value is a string value 
    &lt;ul&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;font color="#0000ff" size="1" face="Courier New"&gt;&amp;lt;nc:ObligationDueAmount&amp;gt;N/A&amp;lt;/nc:ObligationDueAmount&amp;gt;&lt;/font&gt; &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this reason, it is often preferable to use the native XPath function &lt;font color="#0000ff" face="Courier New"&gt;number()&lt;/font&gt;.&amp;#160; As described by &lt;a href="http://www.xsltfunctions.com/xsl/fn_number.html" target="_blank"&gt;Ms. Priscilla Walmsley in her O’Reilly book XQuery&lt;/a&gt;, this function will prevent the XSLT parser from throwing an error and instead return the value ‘NaN’ (Not a Number).&amp;#160; The following would be the same way the Schematron test could be written using the &lt;font color="#0000ff" face="Courier New"&gt;number()&lt;/font&gt; function instead:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;&amp;lt;assert test=&amp;quot;number(nc:ObligationDueAmount) &amp;amp;gt; 0&amp;quot;&amp;gt;
  Bail amount may not be less than zero.
&amp;lt;/assert&amp;gt;
&amp;lt;assert test=&amp;quot;nc:ObligationDueAmount and string-length(nc:ObligationDueAmount) &amp;amp;gt; 0&amp;quot;&amp;gt;
  Bail amount may not be left blank or otherwise omitted.
&amp;lt;/assert&amp;gt;&lt;/pre&gt;

&lt;p&gt;While a few more lines are required, this prevents a runtime parser error from being raised and causing havoc with the validation engine.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-8845764211688066704?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/8845764211688066704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2010/01/schematron-using-number-function-versus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8845764211688066704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8845764211688066704'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2010/01/schematron-using-number-function-versus.html' title='Schematron: Using the Number() Function Versus Casting'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-88878916408931641</id><published>2009-12-26T10:19:00.001-08:00</published><updated>2009-12-26T10:19:30.305-08:00</updated><title type='text'>Article Title and Tag Updates</title><content type='html'>&lt;p&gt;As Schematron is so closely related to XSLT and other related languages such as XQuery, in the new year, we have decided to begin providing XSLT tips in addition to the Schematron tips.&amp;#160; We will be updating the prior posts tags and titles to help differentiate the Schematron from the XSLT articles.&amp;#160; We apologize for any inconvenience or confusion these updates may cause.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-88878916408931641?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/88878916408931641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/12/article-title-and-tag-updates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/88878916408931641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/88878916408931641'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/12/article-title-and-tag-updates.html' title='Article Title and Tag Updates'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-629278594439075611</id><published>2009-12-08T16:34:00.001-08:00</published><updated>2010-10-20T16:21:14.298-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><title type='text'>Schematron: Trim Whitespace When Testing String Length</title><content type='html'>&lt;p&gt;As discussed in previous posts, the &lt;font color="#0000ff" face="Courier New"&gt;string-length() &amp;amp;gt; 0&lt;/font&gt; test is useful in checking to be sure null values are not passed; a validation step that raw XSD does not natively perform.&amp;#160; This ensures the following is &lt;u&gt;NOT&lt;/u&gt; allowed:&lt;/p&gt;    &lt;pre class="brush: xml"&gt;&amp;lt;nc:PersonGivenName&amp;gt;&amp;lt;/nc:PersonGivenName&amp;gt;&lt;/pre&gt;



&lt;p&gt;It also prevents the following:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;&amp;lt;nc:PersonGivenName/&amp;gt;&lt;/pre&gt;

&lt;p&gt;However, if white space is not trimmed, the following &lt;u&gt;WOULD&lt;/u&gt; be allowed:&lt;/p&gt;



&lt;pre class="brush: xml"&gt;&amp;lt;nc:PersonGivenName&amp;gt;  &amp;lt;/nc:PersonGivenName&amp;gt;&lt;/pre&gt;



&lt;p&gt;In order to trim leading and trailing white space, the built-in XSLT function &lt;font color="#0000ff" face="Courier New"&gt;normalize-space()&lt;/font&gt; can be used.&amp;#160; This in effect eliminates the above scenario where spaces have been inserted into the string.&amp;#160; This can be seen in the following example:&lt;/p&gt;



&lt;pre class="brush: xml"&gt;&amp;lt;assert test=&amp;quot;string-length(normalize-space(nc:PersonGivenName)) &amp;amp;gt; 0&amp;quot;/&amp;gt;
  Person&amp;#039;s first name may not be left blank.
&amp;lt;/assert&amp;gt;&lt;/pre&gt;

&lt;p&gt;Be aware, that this function also eliminates redundant spaces between characters (including duplicate carriage returns and line-feeds) so a custom &lt;font color="#0000ff" face="Courier New"&gt;replace()&lt;/font&gt; function may be required if you wish to preserve those extra characters in your string length checks.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-629278594439075611?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/629278594439075611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/12/tip-trim-whitespace-when-testing-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/629278594439075611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/629278594439075611'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/12/tip-trim-whitespace-when-testing-string.html' title='Schematron: Trim Whitespace When Testing String Length'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-8695622860632829648</id><published>2009-11-23T08:45:00.001-08:00</published><updated>2010-10-20T16:26:06.866-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><title type='text'>Schematron: Nesting XPath Values Within an XPath Predicate</title><content type='html'>&lt;p&gt;In previous examples, we have seen the usage of a temporary variable or &lt;font color="#0000ff" face="Courier New"&gt;&amp;lt;let&amp;gt;&lt;/font&gt; tag to store a value which is later used in an XPath predicate (the square brackets surrounding the index of an element array).&amp;#160; It is important to note that this is not required.&amp;#160; A simple XPath statement can be used in the predicate for any other XPath statement.&amp;#160; For example see the following:&lt;/p&gt;    &lt;pre class="brush: xml"&gt;&amp;lt;pattern id=&amp;quot;wEmptyMetadataComment&amp;quot;&amp;gt;
  &amp;lt;title&amp;gt;Ensure person metadata comment is not blank.&amp;lt;/title&amp;gt;
  &amp;lt;rule context=&amp;quot;/ns:SomeDocument/nc:Person&amp;quot;&amp;gt;
    &amp;lt;assert test=&amp;quot;string-length(/ns:SomeDocument/nc:Metadata[@s:id=current()/@s:metadata]/nc:CommentText) &amp;amp;gt; 0&amp;quot;&amp;gt;
      Comments regarding a person should not be blank.
    &amp;lt;/assert&amp;gt;
  &amp;lt;/rule&amp;gt;
&amp;lt;/pattern&amp;gt;&lt;/pre&gt;

&lt;p&gt;In the above example, simply the attribute &lt;font color="#0000ff" face="Courier New"&gt;@s:id=/ns:SomeDocument/nc:Person/@s:metadata&lt;/font&gt; is used to identify which specific Metadata element should be examined.&amp;#160; With the context defined as &lt;font color="#0000ff" face="Courier New"&gt;/ns:SomeDocument/nc:Person&lt;/font&gt;, the rule will loop through each &lt;font color="#0000ff" face="Courier New"&gt;nc:Person&lt;/font&gt; element and use the appropriate &lt;font color="#0000ff" face="Courier New"&gt;@s:metadata&lt;/font&gt; value in each subsequent pass.&lt;/p&gt;

&lt;p&gt;&lt;font size="1"&gt;&lt;em&gt;[Updated: Corrected Syntax on 04-01-2010]&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-8695622860632829648?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/8695622860632829648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/11/tip-nesting-xpath-values-within-xpath.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8695622860632829648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8695622860632829648'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/11/tip-nesting-xpath-values-within-xpath.html' title='Schematron: Nesting XPath Values Within an XPath Predicate'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-983994850533695679</id><published>2009-11-13T14:59:00.001-08:00</published><updated>2010-10-20T16:33:56.429-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><title type='text'>Schematron: Validating NIEM Documents Against Non-Conformant Code Lists</title><content type='html'>&lt;p&gt;Schematron rules and assertions are based upon XPath statements, which allow for a number of powerful XML querying capabilities. Two XPath capabilities leveraged and outlined in this section are &lt;font color="#0000ff" face="Courier New"&gt;doc()&lt;/font&gt; and XPath predicates which allow us to validate data captured in an NIEM XML instance against external code list of any kind. &lt;/p&gt;  &lt;p&gt;Lets assume a scenario where we would like to validate an exchange document’s category against a predefined list of enumerated values.&amp;#160; This list is maintained by an outside party in a format other than NIEM and changes on a fairly regular basis.&amp;#160; &lt;/p&gt;  &lt;p&gt;Traditionally, a NIEM practitioner would take this list and define an enumeration within an extension schema to enforce this code list.&amp;#160; Each time the third party makes a change to that code list, an updated NIEM extension schema would be created and redistributed.&amp;#160; This maintenance-intensive process could become overwhelming therefore the team chose instead to simply adopt the third-party list and keep it in the following non-conformant format relying instead on Schematron to perform the validation:&lt;/p&gt;    &lt;pre class="brush: xml"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&amp;lt;!-- List of Valid code Values --&amp;gt;
&amp;lt;CategoryList&amp;gt;
  &amp;lt;Category&amp;gt;a&amp;lt;/Category&amp;gt;
  &amp;lt;Category&amp;gt;b&amp;lt;/Category&amp;gt;
&amp;lt;/CategoryList&amp;gt;&lt;/pre&gt;

&lt;p&gt;As shown in the above, the valid categories include the values “a” and “b”.&amp;#160; An example of a NIEM-conformant XML payload would look something like the following:&lt;/p&gt;

&lt;pre class="brush: xml"&gt;&amp;lt;ns:SomeDocument 
    xmlns:nc=&amp;quot;http://niem.gov/niem/niem-core/2.0&amp;quot;    
    xmlns:ns=&amp;quot;http://www.niematron.org/SchematronTestbed&amp;quot;
    schemaLocation&amp;quot;http://www.niematron.org/SchematronTestbed  ./SomeDocument.xsd&amp;quot;&amp;gt;
  &amp;lt;nc:DocumentCategoryText&amp;gt;A&amp;lt;/nc:DocumentCategoryText&amp;gt;
  &amp;lt;!-- Remaining Document Elements Omitted --&amp;gt;
&amp;lt;/ns:SomeDocument&amp;gt;&lt;/pre&gt;



&lt;p&gt;In this example, the developers would like to perform the validation ignoring case, therefore the Schematron rule to validate the &lt;font color="#0000ff" face="Courier New"&gt;nc:DocumentCategoryText&lt;/font&gt; against the third-party-provided list would look something like the following:&lt;/p&gt;



&lt;pre class="brush: xml"&gt;&amp;lt;pattern id=&amp;quot;eDocumentCategory&amp;quot;&amp;gt;
  &amp;lt;title&amp;gt;Verify the document category matches the external list of valid categories.&amp;lt;/title&amp;gt;
  &amp;lt;rule context=&amp;quot;/ns:SomeDocument&amp;quot;&amp;gt;
    &amp;lt;let name=&amp;quot;sText&amp;quot; value=&amp;quot;lower-case(nc:DocumentCategoryText)&amp;quot;/&amp;gt;
    &amp;lt;assert test=&amp;quot;count(doc(&amp;#039;./CategoryList.xml&amp;#039;)/CategoryList/Category[. = $sText]) &amp;amp;gt; 0&amp;quot;&amp;gt;
      Invalid document category.
    &amp;lt;/assert&amp;gt;
  &amp;lt;/rule&amp;gt;
&amp;lt;/pattern&amp;gt;&lt;/pre&gt;



&lt;p&gt;Lets look at some of the key statements in the above Schematron example breaking it into individual parts.&amp;#160; &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;font color="#0000ff" face="Courier New"&gt;&lt;strong&gt;lower-case(nc:DocumentCategoryText)&lt;/strong&gt;&lt;/font&gt; – This statement encapsulated in a &lt;font color="#0000ff" face="Courier New"&gt;&amp;lt;let&amp;gt;&lt;/font&gt; tag converts the text in the NIEM payload to lower case thereby ignoring deviations from the code list due to case.&amp;#160; It is then stored in a temporary variable named &lt;font color="#0000ff" face="Courier New"&gt;$sText&lt;/font&gt;. &lt;/li&gt;

  &lt;li&gt;&lt;font color="#0000ff" face="Courier New"&gt;&lt;strong&gt;doc('.CategoryList.xml')/…&lt;/strong&gt;&lt;/font&gt; – This effectively points the parser at the third-party provided file (in this example assumed to be in the same directory as the .sch file) so that elements from that file can be referenced using the XPath in addition to elements in the source payload document.&amp;#160; &lt;/li&gt;

  &lt;li&gt;&lt;font color="#0000ff" face="Courier New"&gt;&lt;strong&gt;…/Category[. = $sText]&lt;/strong&gt;&lt;/font&gt; – The usage of the square brackets ([ and ])&amp;#160; in&amp;#160; an XPath statement is considered a predicate.&amp;#160; Any number of predicate statements can be made to help filter values contained within an XPath, but in this case, the expression tells the parser to select all of the &lt;font color="#0000ff" face="Courier New"&gt;Category&lt;/font&gt; elements with the value contained in the variable &lt;font color="#0000ff" face="Courier New"&gt;$sText&lt;/font&gt;. &lt;/li&gt;

  &lt;li&gt;&lt;font color="#0000ff" face="Courier New"&gt;&lt;strong&gt;count(…) &amp;amp;gt; 0&lt;/strong&gt;&lt;/font&gt; – The XQuery count function returns the number of elements contained in the XPath.&amp;#160; If no match to the category existed, the &lt;font color="#0000ff" face="Courier New"&gt;count&lt;/font&gt; would return a value of zero, therefore we want to ensure the value is greater than zero meaning a match existed in the external code list. &lt;/li&gt;
&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-983994850533695679?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/983994850533695679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/11/validating-against-external-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/983994850533695679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/983994850533695679'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/11/validating-against-external-files.html' title='Schematron: Validating NIEM Documents Against Non-Conformant Code Lists'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-7918147859473439529</id><published>2009-11-06T14:21:00.001-08:00</published><updated>2010-10-20T16:39:09.687-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><title type='text'>Schematron: Enforce String Patterns in Schematron</title><content type='html'>&lt;p&gt;In the general area of XML schemas, XSD “patterns” are commonly used to enforce special string formatting constraints.&amp;#160; This is a very powerful tool when a document recipient wishes to ensure that the sender provides string data in a consistent format.&amp;#160; A common example is the usage of a string constraint is to validate the structure of a Social Security Number (SSN).&amp;#160; This would be expressed in a typical schema in the following manner:&lt;/p&gt;    &lt;pre class="brush: xml"&gt;&amp;lt;xsd:simpleType name=&amp;quot;SsnSimpleType&amp;quot;&amp;gt;
    &amp;lt;xsd:restriction base=&amp;quot;xsd:string&amp;quot;&amp;gt;
        &amp;lt;xsd:pattern value=&amp;quot;[0-9]{3}[\-][0-9]{2}[\-][0-9]{4}&amp;quot; /&amp;gt;
    &amp;lt;/xsd:restriction&amp;gt;
&amp;lt;/xsd:simpleType&amp;gt;&lt;/pre&gt;



&lt;p&gt;As with most parts of NIEM, much of the model is based on inheritance which makes enforce of simple data types, such as that shown above, cumbersome and awkward.&amp;#160; Semantically, the correct element for an SSN would be under:&lt;/p&gt;

&lt;p&gt;&lt;font color="#0000ff" face="Courier New"&gt;nc:Person/nc:PersonSSNIdentification/ nc:IdentificationID&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Since &lt;font color="#0000ff" face="Courier New"&gt;nc:PersonSSNIdentification&lt;/font&gt; is an &lt;font color="#0000ff" face="Courier New"&gt;nc:IdentificationType&lt;/font&gt;, if one were to enforce SSN formatting on &lt;font color="#0000ff" face="Courier New"&gt;nc:IdentificationID&lt;/font&gt;, any other part of the schema that is derived from &lt;font color="#0000ff" face="Courier New"&gt;nc:IdentificationType&lt;/font&gt; would also need to abide by the same rules (e.g. Driver License Number, State ID Number, Document Identification, etc.).&amp;#160; In the past this situation led to one thing. . . extension.&lt;/p&gt;

&lt;p&gt;With Schematron, extension for this purpose could be avoided.&amp;#160; Rather than enforcing the string constraints in the XSD file, instead the IEPD publisher could enforce this constraint within the Schematron rules document instead.&amp;#160; The following is an example of what code would be required in Schematron to accomplish this purpose:&lt;/p&gt;



&lt;pre class="brush: xml"&gt;&amp;lt;pattern id=&amp;quot;ePersonSSN&amp;quot;&amp;gt;
  &amp;lt;title&amp;gt;Verify person social security number is in the correct format.&amp;lt;/title&amp;gt;
  &amp;lt;rule context=&amp;quot;/ns:SomeDocument/nc:Person/nc:PersonSSNIdentification&amp;quot;&amp;gt;
    &amp;lt;assert test=
      &amp;quot;count(tokenize(nc:IdentificationID,&amp;#039;[0-9]{3}-[0-9]{2}-[0-9]{4}&amp;#039;)) 
      - 1 = 1&amp;quot;&amp;gt;
       Social security number must be in the proper format (e.g. 11-222-3333).
    &amp;lt;/assert&amp;gt;
  &amp;lt;/rule&amp;gt;
&amp;lt;/pattern&amp;gt;&lt;/pre&gt;



&lt;p&gt;By using the Schematron approach, the semantically equivalent element is preserved in the schema and only the appropriate identifier is subjected to the constraint. &lt;/p&gt;

&lt;p&gt;This approach can be further extended to address any number of string constraints.&amp;#160; Another example would be ensuring an identification number only contains digits and has a string length of 5 or more.&amp;#160; This could be done by using the following XQuery &lt;font color="#0000ff" face="Courier New"&gt;count()&lt;/font&gt; query instead:&lt;/p&gt;

&lt;p&gt;&lt;font color="#0000ff" face="Courier New"&gt;count(tokenize(nc:IdentificationID, '\d')) &amp;amp;gt; 5&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;This very powerful approach to constraining strings is yet another reason to take a real good look at Schematron in conjunction with your NIEM IEPDs.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-7918147859473439529?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/7918147859473439529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/11/code-example-enforce-string-patterns-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/7918147859473439529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/7918147859473439529'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/11/code-example-enforce-string-patterns-in.html' title='Schematron: Enforce String Patterns in Schematron'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-2084584802586080409</id><published>2009-11-04T12:17:00.001-08:00</published><updated>2010-10-20T16:48:30.661-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><title type='text'>Schematron: Correct nc:DateRepresentation Usage</title><content type='html'>&lt;p&gt;The inherent flexibility of NIEM proves to be an incredibly beneficial when used correctly, however this benefit can also be one of its largest banes.&amp;#160; Sometimes this flexibility can lead to confusion when implementers attempt to deploy a NIEM exchange which is “valid” according to the XSD, yet not what the recipient is expecting.&amp;#160; &lt;/p&gt;  &lt;p&gt;One such example is NIEM’s usage of substitution groups where a variety of data elements are legal according to the schema, but rarely are all of these legal options accounted for by the recipient’s adapter.&amp;#160; Take NIEM’s DateType as an example.&amp;#160; It employs the explicit substitution group (abstract data element) of nc:DateRepresentation which can be one of several different data types.&amp;#160; This representation can be replaced with a date (2009-01-01), a date/time (2009-01-01T12:00:00), a month and a year (01-2009), etc.&amp;#160; &lt;/p&gt;  &lt;p&gt;Lets assume for a minute that a document has two different dates: a document filed date, and a person’s birth date.&amp;#160; The publisher’s intention is that filed date be a “timestamp” which includes both a date and a time, while the birth date is simply a date including a month, day and year.&amp;#160; A valid sample XML payload would look something like the following:&lt;/p&gt;    &lt;pre class="brush: xml"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&amp;lt;ns:SomeDocument&amp;gt;
  &amp;lt;nc:DocumentFiledDate&amp;gt;
    &amp;lt;nc:DateTime&amp;gt;2009-01-01T01:00:00&amp;lt;/nc:DateTime&amp;gt;
  &amp;lt;/nc:DocumentFiledDate&amp;gt;
  &amp;lt;nc:Person&amp;gt;
    &amp;lt;nc:PersonBirthDate&amp;gt;
      &amp;lt;nc:Date&amp;gt;1970-01-01&amp;lt;/nc:Date&amp;gt;
    &amp;lt;/nc:PersonBirthDate&amp;gt;
  &amp;lt;/nc:Person&amp;gt;
&amp;lt;/ns:SomeDocument&amp;gt;&lt;/pre&gt;

&lt;p&gt;The Schematron code to enforce the publisher’s intentions could appear as the following:&lt;/p&gt;



&lt;pre class="brush: xml"&gt;&amp;lt;pattern id=&amp;quot;eDocumentDateTime&amp;quot;&amp;gt;
  &amp;lt;title&amp;gt;Verify the document filed date includes a date/Time&amp;lt;/title&amp;gt;
  &amp;lt;rule context=&amp;quot;ns:SomeDocument/nc:DocumentFiledDate&amp;quot;&amp;gt;
    &amp;lt;assert test=&amp;quot;nc:DateTime&amp;quot;&amp;gt;
      A date and a time must be provided as the document filed date.
    &amp;lt;/assert&amp;gt;
  &amp;lt;/rule&amp;gt;
&amp;lt;/pattern&amp;gt;
&amp;lt;pattern id=&amp;quot;ePersonBirthDate&amp;quot;&amp;gt;
  &amp;lt;title&amp;gt;Ensure the person&amp;#039;s birth date is an nc:Date.&amp;lt;/title&amp;gt;
  &amp;lt;rule context=&amp;quot;ns:SomeDocument/nc:Person/nc:PersonBirthDate&amp;quot;&amp;gt;
    &amp;lt;assert test=&amp;quot;nc:Date&amp;quot;&amp;gt;
      A person&amp;#039;s birth date must be a full date.
    &amp;lt;/assert&amp;gt;
  &amp;lt;/rule&amp;gt;
&amp;lt;/pattern&amp;gt;&lt;/pre&gt;



&lt;p&gt;This is a great example of how Schematron can help clarify a publisher’s intent as NEIM-conformant services are developed and deployed.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-2084584802586080409?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/2084584802586080409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/11/code-example-correct.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/2084584802586080409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/2084584802586080409'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/11/code-example-correct.html' title='Schematron: Correct nc:DateRepresentation Usage'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-5713095528822398483</id><published>2009-10-21T13:26:00.001-07:00</published><updated>2010-10-20T16:51:40.786-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><title type='text'>Schematron: License Plate State is Required when a Number Exists</title><content type='html'>&lt;p&gt;A common practice in transportation and law enforcement is to document a vehicle’s license plate number.&amp;#160; In many situations, this plate number must be accompanied by the state which issued the license plate.&amp;#160; &lt;/p&gt;  &lt;p&gt;In NIEM, a vehicle’s license plate is contained within the &lt;font color="#0000ff" face="Courier New"&gt;nc:ConveyanceRegistrationPlateIdentification&lt;/font&gt; element which is an &lt;font color="#0000ff" face="Courier New"&gt;nc:IdentificationType&lt;/font&gt;.&amp;#160; Using schema cardinality, one could make a the state required by simply assigning a &lt;font color="#0000ff" face="Courier New"&gt;minOccurs=”1”&lt;/font&gt; to the &lt;font color="#0000ff" face="Courier New"&gt;nc:IdentificationJurisdiction&lt;/font&gt; element, however this can often cause more problems than it solves for two key reasons:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Making jurisdiction required through schema cardinality makes it required globally throughout the exchange even if it doesn’t apply in those scenarios as many other elements in a typical NIEM exchange are also &lt;font color="#0000ff" face="Courier New"&gt;nc:IdentificationType&lt;/font&gt; data types. &lt;/li&gt;    &lt;li&gt;&lt;font color="#0000ff" face="Courier New"&gt;nc:IdentificationJurisdiction&lt;/font&gt; is an abstract data element that can be replaced with any number of elements, not all of which are enumerated state values.&amp;#160; Some are country codes, some are province codes for other countries and others are simply free-text.&amp;#160; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This presents another ideal use case for Schematron.&amp;#160; The following example code segment ensures a NCIC plate issuing state is included any time a Plate Identification exists:&lt;/p&gt;    &lt;pre class="brush: xml"&gt;&amp;lt;pattern id=&amp;quot;eVehiclePlateState&amp;quot;&amp;gt;
  &amp;lt;title&amp;gt;Ensure a plate state is included with a plate number.&amp;lt;/title&amp;gt;
  &amp;lt;rule context=&amp;quot;ns:MyDocument/nc:Vehicle/nc:ConveyanceRegistrationPlateIdentification&amp;quot;&amp;gt;
    &amp;lt;assert test=&amp;quot;j:IdentificationJurisdictionNCICLISCode&amp;quot;&amp;gt;
      A plate state must be included with vehicle license plate.
    &amp;lt;/assert&amp;gt;
  &amp;lt;/rule&amp;gt;
&amp;lt;/pattern&amp;gt;&lt;/pre&gt;

&lt;p&gt;The same segment can be modified to enforce any of the available jurisdiction code lists.&amp;#160; For example, an exchange in Canada may wish to check for the existence of &lt;font color="#0000ff" face="Courier New"&gt;j:IdentificationJurisdictionCanadianProvinceCode&lt;/font&gt; instead of &lt;font color="#0000ff" face="Courier New"&gt;j:IdentificationJurisdictionNCICLISCode&lt;/font&gt;.&amp;#160; &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-5713095528822398483?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/5713095528822398483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/10/code-example-license-plate-state-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/5713095528822398483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/5713095528822398483'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/10/code-example-license-plate-state-is.html' title='Schematron: License Plate State is Required when a Number Exists'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-6405076301559774210</id><published>2009-10-14T16:15:00.001-07:00</published><updated>2009-10-14T16:15:56.391-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='Background'/><title type='text'>Link: Schematron Tutorials</title><content type='html'>&lt;p&gt;There are a number of solid Schematron tutorials posted on the internet.&amp;#160; Two of most comprehensive ones available are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The Oasis-Hosted &lt;a href="http://xml.coverpages.org/schematron.html"&gt;Coverpages.com Schematron Article&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.xfront.com/schematron/index.html"&gt;Roger Costello’s Tutorial&lt;/a&gt;&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We won’t plagiarize their incredible wealth of Schematron material here, so it is highly recommend developers jump to and use these online tutorials.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-6405076301559774210?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/6405076301559774210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/10/link-schematron-tutorials.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/6405076301559774210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/6405076301559774210'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/10/link-schematron-tutorials.html' title='Link: Schematron Tutorials'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-7332648997774773132</id><published>2009-10-12T15:57:00.001-07:00</published><updated>2010-10-21T13:00:39.851-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='1.5'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><title type='text'>Schematron: Use Phase for Errors and Warnings</title><content type='html'>&lt;p&gt;Schematron allows for grouping of rules not only by XPath, but also through association using the “Phase” element. While this has long been recommended as an approach for improving validation performance and unit testing, Phase also serves as an excellent way to group together and differentiate between critical errors and simple warnings. &lt;/p&gt;  &lt;p&gt;For example, an agency might choose to have some minimum data restrictions surrounding Officers and Agencies on a electronic citation that can not be overlooked, and at the same time have warnings surrounding statue codes that do not match the known state code values. In Schematron the following would the the code matching this scenario:&lt;/p&gt;  &lt;pre class="brush: xml"&gt;&amp;lt;!-- Rules resulting in just warnings (should not prevent submission) --&amp;gt;
&amp;lt;phase id=&amp;quot;Warnings&amp;quot;&amp;gt;
  &amp;lt;active pattern=&amp;quot;validStatute&amp;quot;/&amp;gt;
&amp;lt;/phase&amp;gt;
&amp;lt;!-- Rules resulting in errors (must prevent submission) --&amp;gt;
&amp;lt;phase id=&amp;quot;Errors&amp;quot;&amp;gt;
  &amp;lt;active pattern=&amp;quot;minOfficerData&amp;quot;/&amp;gt;
  &amp;lt;active pattern=&amp;quot;minAgencyData&amp;quot;/&amp;gt;
&amp;lt;/phase&amp;gt;&lt;/pre&gt;

&lt;p&gt;The pattern attribute is an IDREF to a related pattern ID somewhere in the document. A developer can then create code to prevent the submission of any validation errors resulting from only one of the above phases. Schematron validation engines typically have command line switches or parameters to specify which phase should be run. For example, in Xerces’ implementation of Saxon, the parameter “phase=x” is used where x is one of the phase id’s listed above or “#ALL” if all phases should be processed.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-7332648997774773132?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/7332648997774773132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/10/tip-use-phase-for-errors-and-warnings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/7332648997774773132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/7332648997774773132'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/10/tip-use-phase-for-errors-and-warnings.html' title='Schematron: Use Phase for Errors and Warnings'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-5622684892601173364</id><published>2009-10-09T14:43:00.000-07:00</published><updated>2009-12-26T10:42:07.521-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Summary'/><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='1.5'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><category scheme='http://www.blogger.com/atom/ns#' term='Background'/><title type='text'>Schematron: Recommended Reading</title><content type='html'>&lt;span style="font-family: arial" class="Apple-style-span"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;What books exists out there that detail Schematron and how to use it? &lt;/span&gt;&lt;/span&gt;  &lt;div&gt;&lt;span style="font-family: arial" class="Apple-style-span"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;&lt;/span&gt;&lt;/span&gt;    &lt;div&gt;&lt;span style="font-family: arial" class="Apple-style-span"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;Best one I've seen to date is &lt;/span&gt;&lt;/span&gt;&lt;a href="http://oreilly.com/catalog/9780596527716"&gt;&lt;span style="font-family: arial" class="Apple-style-span"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;&amp;quot;Schematron&amp;quot; from O'Reilly Media&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: arial" class="Apple-style-span"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt; available in electronic (&lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.adobe.com/"&gt;&lt;span style="font-family: arial" class="Apple-style-span"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;Adobe PDF&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: arial" class="Apple-style-span"&gt;&lt;span style="font-size: small" class="Apple-style-span"&gt;) format for $9.99 USD. Provides a great overview and set of examples using Schematron, albeit exclusively in hierarchically linked XML documents. It does assume the reader already has a strong understanding of XML and XSLT. If you are a bit rusty on XSLT or XQuery, you'll want to pick up a book on that as well.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-5622684892601173364?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/5622684892601173364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/10/recommended-reading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/5622684892601173364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/5622684892601173364'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/10/recommended-reading.html' title='Schematron: Recommended Reading'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-8578394303464726954</id><published>2009-10-07T08:31:00.000-07:00</published><updated>2010-10-21T13:15:30.205-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Example'/><category scheme='http://www.blogger.com/atom/ns#' term='Schematron'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><title type='text'>Schematron: Officer Has a Last Name</title><content type='html'>&lt;p&gt;This is the first in a series of code example articles that will be posted to give NIEM developers a head start in using Schematron. This example will show how to perform a test across multiple branches or nodes of a typical NIEM schema as law enforcement officer is a role played by a person in NIEM schemas. Take the following example XML code:&lt;/p&gt;    &lt;pre class="brush: xml"&gt;&amp;lt;ns:SomeDocument&amp;gt;
&amp;lt;j:Citation&amp;gt;  
   &amp;lt;j:CitationIssuingOfficial&amp;gt;
     &amp;lt;nc:RoleOfPersonReference s:ref=&amp;quot;P1&amp;quot;/&amp;gt;  
   &amp;lt;/j:CitationIssuingOfficial&amp;gt;
&amp;lt;/j:Citation&amp;gt;
&amp;lt;nc:Person s:id=&amp;quot;P1&amp;quot;&amp;gt;
   &amp;lt;nc:PersonName&amp;gt;&amp;lt;nc:PersonSurName&amp;gt;Smith&amp;lt;/nc:PersonSurName&amp;gt;&amp;lt;/nc:PersonName&amp;gt;
&amp;lt;/nc:Person&amp;gt;
&amp;lt;/ns:SomeDocument&amp;gt;&lt;/pre&gt;



&lt;p&gt;One way in which to test for the existence of a last name is to match the ID with the officer's REF and test to be sure the string length is greater than 1 as shown in the following example (using XSLT2 &amp;amp; ISO Schematron):&lt;/p&gt;



&lt;pre class="brush: xml"&gt;&amp;lt;pattern id=&amp;quot;eOfficerData&amp;quot;&amp;gt; 
    &amp;lt;let name=&amp;quot;sOfficerRef&amp;quot; value=&amp;quot;ns:SomeDocument/j:Citation/ j:CitationIssuingOfficial/nc:RoleOfPersonReference/@s:ref&amp;quot;/&amp;gt; 
    &amp;lt;rule context=&amp;quot;ns:SomeDocument/nc:Person&amp;quot;&amp;gt; 
        &amp;lt;report test=&amp;quot;@s:id = $sOfficerRef and string-length(nc:PersonName/nc:PersonSurName) &amp;lt; 1&amp;quot;&amp;gt; 
            Officers last name must be provided. 
        &amp;lt;/report&amp;gt; 
    &amp;lt;/rule&amp;gt; 
&amp;lt;/pattern&amp;gt;&lt;/pre&gt;



&lt;p&gt;In theory the same test can be done using the XQuery &lt;code&gt;id()&lt;/code&gt; function however use of the &lt;code&gt;id&lt;/code&gt; function is HIGHLY dependent on the parser's capabilities. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-8578394303464726954?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/8578394303464726954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/10/code-example-officer-has-last-name.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8578394303464726954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8578394303464726954'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/10/code-example-officer-has-last-name.html' title='Schematron: Officer Has a Last Name'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-1114921406165280741</id><published>2009-10-05T19:31:00.000-07:00</published><updated>2009-10-05T20:43:33.775-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='1.5'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='ISO'/><title type='text'>To ISO or Not to ISO</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Schematron comes in two common flavors, Schemtron v1.5 (older) and ISO Schematron (newer).  While there are a number of differences that can be read about on the official &lt;a href="http://www.schematron.com/spec.html"&gt;Schematron Website&lt;/a&gt;, it can sometimes be confusing about which version is "best".  The following table presents some of the differences between the two:
&lt;table border="1" width="70%"&gt;&lt;tr&gt;&lt;td  align="center" width="40%"&gt;&lt;b&gt;Feature&lt;/b&gt;&lt;/td&gt;&lt;td align="center" width="15%"&gt;&lt;b&gt;v1.5&lt;/b&gt;&lt;/td&gt;&lt;td align="center" width="15%"&gt;&lt;b&gt;ISO&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Varriables&lt;/b&gt;&lt;/td&gt;&lt;td align="center" &gt;Not supported&lt;/td&gt;&lt;td align="center" &gt;&lt;code&gt;let&lt;/code&gt; element available.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Query Language&lt;/b&gt;&lt;/td&gt;&lt;td align="center" &gt;XSLT 1.0/XPath 1.0&lt;/td&gt;&lt;td align="center" &gt;XSLT 1.0/XPath 1.0, XSLT 2.0/XPath 2.0, EXSLT, STX, XSLT 1.1, etc.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Abstract Patterns &amp;amp; Inheritance&lt;/b&gt;&lt;/td&gt;&lt;td align="center" &gt;Not Supported&lt;/td&gt;&lt;td align="center" &gt;Supported&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;&lt;code&gt;value-of&lt;/code&gt; Element&lt;/b&gt;&lt;br/&gt;&lt;i&gt;(helpful in debugging and error messaging)&lt;/i&gt;&lt;/td&gt;&lt;td align="center" &gt;Not Supported&lt;/td&gt;&lt;td align="center" &gt;Supported&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;&lt;code&gt;xsl:key&lt;/code&gt; Element&lt;/b&gt;&lt;/td&gt;&lt;td align="center" &gt;Supported&lt;/td&gt;&lt;td align="center" &gt;Not Supported&lt;br/&gt;&lt;i&gt;(Workaround Exists)&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;&lt;code&gt;flag&lt;/code&gt; Attribute&lt;/b&gt;&lt;/td&gt;&lt;td align="center" &gt;Not Supported&lt;/td&gt;&lt;td align="center" &gt;Supported&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;SVRL&lt;/b&gt;&lt;/td&gt;&lt;td align="center" &gt;Not Supported&lt;/td&gt;&lt;td align="center" &gt;Supported&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;&lt;code&gt;include&lt;/code&gt; element&lt;/b&gt;&lt;/td&gt;&lt;td align="center" &gt;Not Supported&lt;/td&gt;&lt;td align="center" &gt;Supported&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
My suggestion would be to go with ISO Schematron, for the following reasons:
&lt;ul&gt;
&lt;li&gt;Support for variables is important when working with ID and IDREF (more about this in a later blog).&lt;/li&gt;
&lt;li&gt;XQuery 2.0 functions provide a number of goodies that would be hard to pass up.&lt;/li&gt;
&lt;li&gt;ISO Schematron is a recognized ISO standard. . . which should count for something in a standards-based community.&lt;/li&gt;
&lt;/ul&gt;

Feel free to comment if you know any other key differences or disagree with my suggestion.
Update: 2009-10-05 - Correct typo.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-1114921406165280741?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/1114921406165280741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/10/to-iso-or-not-to-iso.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/1114921406165280741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/1114921406165280741'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/10/to-iso-or-not-to-iso.html' title='To ISO or Not to ISO'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-8190160192721018105</id><published>2009-10-05T06:11:00.000-07:00</published><updated>2009-10-05T20:41:48.555-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Editix'/><category scheme='http://www.blogger.com/atom/ns#' term='XMLSpy'/><category scheme='http://www.blogger.com/atom/ns#' term='oXygen'/><category scheme='http://www.blogger.com/atom/ns#' term='Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='XML Editor'/><title type='text'>XML Editor Support for Schematron</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;XML editors are one of the primary tools in a practitioner's toolbox and as such, are the first place many of us look for assistance using a complex validation engine such as Schematron. Currently today editors on the market have different levels of support for Schematron; as it is at the core a multi-pass validation engine. The following table should provide you with links to where tutorials for some of the most common XML editors are located:
&lt;table border="1"&gt;
&lt;thead&gt;&lt;tr&gt;&lt;td align="middle"&gt;&lt;b&gt;Editor&lt;/b&gt;&lt;/td&gt;&lt;td align="middle"&gt;&lt;b&gt;Native Schematron Validation?&lt;/b&gt;&lt;/td&gt;&lt;td align="middle"&gt;&lt;b&gt;Native Schematron Editing?&lt;/b&gt;&lt;/td&gt;&lt;td align="middle"&gt;&lt;b&gt;Tutorial&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td align="middle"&gt;&lt;a href="http://www.oxygenxml.com/"&gt;oXygen&lt;/a&gt;&lt;/td&gt;&lt;td align="middle"&gt;Yes&lt;/td&gt;&lt;td align="middle"&gt;Yes&lt;/td&gt;&lt;td align="middle"&gt;&lt;a href="http://www.oxygenxml.com/validation.html"&gt;http://www.oxygenxml.com/validation.html&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="middle"&gt;&lt;a href="http://www.altova.com/"&gt;XMLSpy&lt;/a&gt;&lt;/td&gt;&lt;td align="middle"&gt;No&lt;/td&gt;&lt;td align="middle"&gt;Yes&lt;/td&gt;&lt;td align="middle"&gt;&lt;a href="http://xml.sys-con.com/node/40656"&gt;http://xml.sys-con.com/node/40656&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align="middle"&gt;&lt;a href="http://www.editix.com/"&gt;Editix&lt;/a&gt;&lt;/td&gt;&lt;td align="middle"&gt;Yes&lt;/td&gt;&lt;td align="middle"&gt;Yes&lt;/td&gt;&lt;td align="middle"&gt;None available&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Update: 2009-10-05 - Adding Hyperlink to Editor websites.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-8190160192721018105?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/8190160192721018105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/10/xml-editor-support-for-schematron.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8190160192721018105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8190160192721018105'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/10/xml-editor-support-for-schematron.html' title='XML Editor Support for Schematron'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5850531075761764705.post-8402863008227602197</id><published>2009-10-05T05:59:00.001-07:00</published><updated>2009-10-05T06:11:53.779-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Summary'/><category scheme='http://www.blogger.com/atom/ns#' term='NIEMNTE'/><category scheme='http://www.blogger.com/atom/ns#' term='Background'/><title type='text'>Welcome!</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Welcome to the initial post of the NIEM-Schematron (aka NIEMatron) community.  At the 2009 NIEM National Training Event (see #NIEMNTE on Twitter) it became apparent that the next big task for NIEM was ensuring that data was self-describing.  As it currently stands today, the XML Schema Documents (XSD) used can only enforce and describe a small portion of the data in each Information Exchange Package Document (IEPD) developed.  Expressing complex business rules has and continues to be a large struggle for many implementers of the NIEM standard. 

Most implementers have chosen to use validation logic built using whatever programming language fits their need (e.g. Java, VB.net, C++, C#, etc.) however once this is done, there is very little that one of their information exchange partners can use if the partner leverages a different technology or programming language.  This problem is one of the key reasons the XML community developed the ISO standard Schematron.  Schematron is a simple XML/XSLT-based script that allows implementers to describe highly complex business rules that would otherwise be impossible to describe using XSD alone.

This website and blog will be updated on a regular basis to provide NIEM practitioners a place to learn about, ask questions, and discuss Schematron.  We will attempt to provide as much information to NIEM developers as possible about tricks and traps we've encountered while using this powerful scripting language and will also be providing further executive-level explanations surrounding the technology and the value proposition it brings.  Please be patient as like many of you, we travel quite often and may have difficulty responding immediately to questions you pose. 
 Please follow us on Twitter (user: NIEMatron) if you would like to be appraised of new messages as they are posted.  Thanks, and welcome to the future!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5850531075761764705-8402863008227602197?l=niematron.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niematron.blogspot.com/feeds/8402863008227602197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://niematron.blogspot.com/2009/10/welcome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8402863008227602197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5850531075761764705/posts/default/8402863008227602197'/><link rel='alternate' type='text/html' href='http://niematron.blogspot.com/2009/10/welcome.html' title='Welcome!'/><author><name>Joel Byford</name><uri>http://www.blogger.com/profile/13757192317441701478</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_hc4bbeOuQpk/SsjqUS90TAI/AAAAAAAACnc/FJUvo-GVe1g/S220/NIEMatronLogo.png'/></author><thr:total>0</thr:total></entry></feed>
