Announcement

Collapse
No announcement yet.

Influencing the XMLSorted sort order

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • seanc217
    replied
    Hi Jlg7,

    Did you ever get the Informatica xml compare to work?
    I would be interested in using this for some comparison work I am working on.

    In Informatica I wrote a process that exports every folder to an xml file and would like to compare the resultant xml between our various environments for reporting and syncing.

    If you can provide assistance here , please advise and thank you!!

    Sean

    Leave a comment:


  • Aaron
    replied
    Hello,

    There isn't specific Version information, but the BC3's Conversion tab, External program will show the command line, while BC4's uses the dropdown menu for an internal "XML Sort" (hence, why it does not support editing) instead of showing a External Program command line. If you install one format, then rename it to "XML Sort BC3", you can then install the other.

    We don't have a better internal or download method, but if you are familiar with any command line process that can sort/restructure your files into a tidied format, we can plug it into BC4 to use it. You could use the BC3 variant as a base line, and we have a KB article (using RESX files) as an example, here:
    http://www.scootersoftware.com/suppo...rnalconversion

    Leave a comment:


  • jlg07
    replied
    "The order of the lines is important to the comparison, so the alignment isn't moving a single pair to compare, but shifting the file so those lines can compare. If lines are out of order, this can shift them up or down, out of alignment, which then causes them to also be a difference. Does this look like what is happening for your files?"
    Yes, this exactly what is happening.

    I did DL the BC3 variant, and looked at the .XSLT file, but it is pretty basic and I'm not a great xslt person. If that is the only solution here, I will have to look into using this instead.

    BTW, is there a way to see the VERSION of the plugins currently installed in the system? I'd like a way to tell if the BC4 or BC3 version is installed....

    Leave a comment:


  • Aaron
    replied
    Hello,

    When you mention that the manual alignment causes "other errors to appear" do you mean it causes other lines to then be 'pushed' up and down, no longer align, and are newly different?

    The order of the lines is important to the comparison, so the alignment isn't moving a single pair to compare, but shifting the file so those lines can compare. If lines are out of order, this can shift them up or down, out of alignment, which then causes them to also be a difference. Does this look like what is happening for your files?

    The additional downloads for XML Sort usually are able to handle unsorted XML, but from your original post it sounded like this one wasn't meeting your needs. To verify, the BC4 version of the "XML Sorted" download does not handle these files, correct?
    http://www.scootersoftware.com/downl..._moreformatsv4
    This would be the easiest solution if it works automatically.

    If not, you asked for influence, and that requires downloading the BC3 variant of "XML Sorted and Tidied" format, which includes several helper files, including an .xslt configuration file that can be edited/updated to handle a specific xml pattern. The included .xlst handles XML as best it can in a generic case, but you may be able to edit it for your specific file structure.
    http://www.scootersoftware.com/downl..._moreformatsv3

    Improving overall XML comparison is something on our wishlist, but is a large project due to the open ended nature of XML structures.

    Leave a comment:


  • jlg07
    replied
    Unfortunately, the "Never align" just makes EACH one a difference -- it doesn't based on the TRANSFORMATIONNAME in the line. It doesn't
    "match" the lines that are the same although on different lines....

    Leave a comment:


  • Chris
    replied
    If the lines that are misaligned are exact matches, you can try checking Never align differences in the Alignment tab of Session Settings.

    Leave a comment:


  • jlg07
    replied
    In essence, YES I want to match a number of lines like Line 33 with Line37, Line 39 with line 23, etc.. but trying to do that align in the GUI causes a ton of other errors to show up due to the shifting of the lines.

    I tried that alternate algorithms and none of those helped change the sorting or alignment at all.

    What about Text weights? I tried to add a weight for SINSTANCENAME (set to 5 for top priority) but it didn't seem to change ANYTHING in the output.

    Leave a comment:


  • Aaron
    replied
    Hello,

    If you enable Show All, and you use the manual right-click Align With command with Line 33 and then select line 37 as the target, is this the type of alignment you need?

    If yes, you can try alternate alignment algorithms in the Session menu -> Session Settings, Alignment tab (such as patience diff) to see if other combinations of options work better for these files. These options can then apply for the current view or be updated to act as session defaults for all future text comparisons.

    If this is insufficient, and the structure itself needs to change, then reformatting the XML sort itself is not directly configurable, but you could download an older BC3 variant of the XML Sorted and Tidied, which exposes the .xslt file for editing, here:
    http://www.scootersoftware.com/downl..._moreformatsv3
    Search for: XML sorted and tidied

    BC4 does support importing BC3 formats, and whichever is topmost in the Tools menu -> File Formats list for *.xml is the format picked automatically when double clicking or running rules-based scans. The conversion tab will also show where the Helper files are located (default %AppData%\Scooter Software\Beyond Compare 4\Helpers\) for editing the included .xslt.

    Leave a comment:


  • jlg07
    started a topic Influencing the XMLSorted sort order

    Influencing the XMLSorted sort order

    I have an issue where parts of a given line type are not sorted correctly. I am getting diffs because on, say line 33, it has the one line, and that SAME line in the other file is on line 37 after the XML sort is done.

    Here is an example in the attachment
    I'd like to know if there is a way to "influence" the sort order for particular lines in the XML sorted.

    SO, for a line like this:
    Code:
    <SESSTRANSFORMATIONINST ISREPARTITIONPOINT="YES" PARTITIONTYPE="PASS THROUGH" PIPELINE="24" SINSTANCENAME="ELKP_ORG_CLASS" STAGE="4" TRANSFORMATIONNAME="ELKP_ORG_CLASS" TRANSFORMATIONTYPE=.....
    Tell XML SORTED that for SESSTRANSFORMATIONINST lines, to order to include the SINSTANCENAME and/or the TRANSFORMATIONNAME as one of the primary sort keys.


    Attached Files
Working...
X