Re: Combining XML data

Subject: Re: Combining XML data
From: T_MULLEN 58211 6th Singer St <Tom.Mullen@xxxxxxxxxxx>
Date: Wed, 12 Jul 2000 08:50:20 +0000 (GMT)
Jeni,

Many thanks for your comments

>Both of these approaches take document1.xml as the primary document - it
is
>specified as the input and is used as the basis of the comparison.  You'd
>have to do something a bit more complicated if you wanted to do the
>comparison the other way as well (e.g. identify the elements that exist in
>document2 but not in document1).
>
>Probably posting your documents and giving more details about the possible
>similarities and differences would help give more relevant examples.
>

I'm trying to develop a configuration manager/release tool that has at the
heart of it an XML document.  The XML document would store information
about all the configured items that are used in the release and those items
that are used to create other released items (eg executables).  XSL
stylesheets could then be used on the XML document to create batch files
that automatically perform

1) extraction of the released item from various sources into a release
package
2) release of the package on to target machines (including the saving of
older versions for fallback)
3) fallback to the previous version.
4) information gathering of files at all stages (selection, package
creation, deployment)

In addition, at each stage information (timestamps, version numbers) about
the files selected for release, extracted for release and released are
merged back in to the XML document.  This provides a complete description
(formulation and deployment) of a release/version of the software.

Here's where my original question came in.  It would be useful (possibly
necessary) that comparisons are made of:

a) the items selected or used between different versions/release
b) the items currently deployed on a target machine compared against the
information obtained at the time of release (for regular verification)
c) the items currently extracted for release (to check that someone hasn't
slipped in a change since the release package was made)

etc.

Alerts must be given for items that are included in the recorded XML doc
but not in the latest list and vice versa.

In comparing the original document to, say, the items currently deployed I
need to compare each item's information at that level (e.g. not the release
selection information).

An example XML doc is shown below.  The <RELEASE..> tags make it easy to
create a new, "blank" (i.e. no release information) release document from
the previous version whilst copying the entire list of configured items and
general info.

I've written fairly terse XSL docs that sort the configured items and
resolve the logicals and been amazed at what can be achieved by XSL with so
few lines of XSL code.  However, I feel a differencing and merging tool
written as a java app may be easier to code and understand than if it were
written as an XSL doc.  Nevertheless, I bow to your superior knowledge so
any pointers would be most helpful.

<?xml version='1.0'?>
<!-- created by Tom Mullen (Mindclear) -->
<RELEASEDOC>
 <!--General Logicals-->
 <LOGICALDEF>
  <NAME>CODECMS</NAME>
  <DIRECTORY>DISK:[CODE]</DIRECTORY>
 </LOGICALDEF>
 </LOGICALDEF>
 <LOGICALDEF>
  <NAME>TOOLKIT</NAME>
  <DIRECTORY>DISK:[TKT]</DIRECTORY>
 </LOGICALDEF>
 <LOGICALDEF>
  <NAME>TOOLEXE</NAME>
  <DIRECTORY>Q$TOOL:[TOOL]</DIRECTORY>
 </LOGICALDEF>
 <!--Selection global info-->
 <RELEASESELECTION>
  <VERSION>2.01</VERSION>
  <RELTYPE>FULL</RELTYPE>
  <CMSCLASSDEF>
   <LOGICAL/>
   <CMSCLASS>V0200</CMSCLASS>
  </CMSCLASSDEF>
   <NAME>BUILD</NAME>
   <DIRECTORY>DISK:[BUILD.V0200]</DIRECTORY>
  </LOGICALDEF>
  <LOGICALDEF>
   <NAME>RELEASEDIR</NAME>
   <DIRECTORY>DISK:[RELEASE.V0200]</DIRECTORY>
  </LOGICALDEF>
 </RELEASESELECTION>
 <!--Configured Items section-->
 <CONFIGUREDITEM>
  <NAME>OUTPUT.EXE</NAME>
  <DESCRIPTION>Output Executable</DESCRIPTION>
  <SOURCE>
   <LOGICAL>BUILD</LOGICAL>
  </SOURCE>
  <TARGET>
   <LOGICAL>TOOLEXE</LOGICAL>
  </TARGET>
  <RELEASESELECTION>
     <SELECTED/>
     <VERSION>4</VERSION>
     <TIMESTAMP>04-JUL-2000 12:23:45.67</TIMESTAMP>
  </RELEASESELECTION>
  <RELEASEDEPLOYMENT>
     <TIMESTAMP>04-JUL-2000 12:23:45.67</TIMESTAMP>
  </RELEASEDEPLOYMENT>
 </CONFIGUREDITEM>
</RELEASEDOC>


Thanks again for your help (and your patience if you read all of this)

Tom

-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread