• Blog
  • Info Support
  • Career
  • Training
  • International Group
  • Info Support
  • Blog
  • Career
  • Training
  • International Group
  • Search
logo InfoSupport
  • Latest blogs
  • Popular blogs
  • Experts
      • All
      • Bloggers
      • Speakers
  • Meet us
  • About us
    • nl
    • en
    • .NET
    • 3D printing
    • Advanced Analytics
    • Agile
    • Akka
    • Alexa
    • Algorithms
    • Api's
    • Architectuur
    • Artificial Intelligence
    • ATDD
    • Augmented Reality
    • AWS
    • Azure
    • Big Data
    • Blockchain
    • Business Intelligence
    • Chatbots
    • Cloud
    • Code Combat
    • Cognitive Services
    • Communicatie
    • Containers
    • Continuous Delivery
    • CQRS
    • Cyber Security
    • Dapr
    • Data
    • Data & Analystics
    • Data Science
    • Data Warehousing
    • Databricks
    • DataOps
    • Developers life
    • DevOps
    • Digital Days
    • Digital Twin
    • Docker
    • eHealth
    • Enterprise Architecture
    • Event Sourcing
    • Hacking
    • Infrastructure & Hosting
    • Innovatie
    • Integration
    • Internet of Things
    • Java
    • Machine Learning
    • Microservices
    • Microsoft
    • Microsoft Bot Framework
    • Microsoft Data Platform
    • Mobile Development
    • Mutation Testing
    • Open source
    • Pepper
    • Power BI
    • Privacy & Ethiek
    • Python
    • Quality Assistance & Test
    • Quality Assurance & Test
    • Requirements Management
    • Scala
    • Scratch
    • Security
    • SharePoint
    • Software Architecture
    • Software development
    • Software Factory
    • SQL Server
    • SSL
    • Start-up
    • Startup thinking
    • Stryker
    • Test Quality
    • Testing
    • TLS
    • TypeScript
    • Various
    • Web Development
    • Web-scale IT
    • Xamarin
    • All
    • Bloggers
    • Speakers
Home » Compare WF4 XAML files, ignoring the display information
  • Compare WF4 XAML files, ignoring the display information

    • By Manuel Riezebosch
    • Various 12 years ago
    • Various 0 comments
    • Various Various
    Compare WF4 XAML files, ignoring the display information

    With Workflow4, there is "some" information stored for the designer inside the XAML. This makes it quite hard to compare different versions of the same file. For example a different zoom factor already causes a lot of differences. What I’m trying to do is to set up my difference tool to ignore these differences and only show me the differences that matter.

    An example of the troubles you get when comparing two XAML files:

    Although I’m a big fan of  WinMerge, I could not get this working with the built-in filter mechanism. It supports regular expressions for line filtering, but unfortunately this means that the whole line is ignored when it matches the expression. This means that when filtering on the designer information, these lines will completely be ignored even if there are other differences. Not exactly what I wanted…

    WIth  SourceGear DiffMerge I got exactly what I wanted, and, even better, the tool itself turned out to be very good. The layout is kind of the same as WinMerge, except for the DiffPane at the bottom. But instead of that it is possible to split the windows horizontally to increase the readability. The only disappointment I had is that it does not have any syntax highlighting included. On the other hand, it supports three-way merge which I haven’t tried yet.
    These are the steps to perform to ignore the designer information using DiffMerge:
    1. Tools» Options…
    2. File Windows » Rulesets » Add…
    3. On the Name tab
      1. Ruleset Name: Workflow4 (or whatever you want)
      2. File Suffixes: xaml
    4. On the Content Handling tab add a "context" for the designer information attributes:
      1. Add…
      2. Start Pattern: sap:VirtualizedContainerService.HintSize="
      3. End Pattern: "
      4. Ends at EOL: Unchecked
      5. Classify Differences as Important: Unchecked
    5. Add a "context" for the designer information elements: 
      1. Add…
      2. Start Pattern: <sap:VirtualizedContainerService.HintSize>
      3. End Pattern: </sap:VirtualizedContainerService.HintSize>
      4. Ends at EOL: Unchecked
      5. Classify Differences as Important: Unchecked

    It now only ignores the HintSize attributes and elements. Maybe it is safe to ignore all "sap" prefixed items. Hence they are marked as mc:Ignorable at the top of the XAML (where mc is the prefix for http://schemas.openxmlformats.org/markup-compatibility/2006). I’m not sure about that and the HintSize is the only one that has bothered me thus far.

    As you can see the difference in HintSize is still shown in a different color, but it is not highlighted as the other change. These designer differences are also excluded on the location bar on the left. For me this makes comparing XAML files a lot easier!

    See also James Manning’s blog about how to integrate the different diff/merge tools into the Visual Studio environment if you haven’t done that yet. You can also choose to use WinMerge as the default compare tool and DiffMerge only for XAML!

    I hope you enjoyed this first blog.

    Update:

    Me and the team I’m on have used this solution for quite some time all working on the same build template (XAML). We haven’t experienced any problems using it. The only additional tweak I did is ignore *everything* in the sap-namespace and that seems to be ok too. The following pattern I used:

    1. Start Pattern: <sap:
    2. End Pattern: </sap:.*>

    Share this

Manuel Riezebosch

View profile

IT Training at Info Support

Which training fits you?

Consultancy

Consultancy

Related blogs

  • Video Conferencing en OBS Studio koppelen: online prese…

    Video Conferencing en OBS Studio koppelen: online prese… Maaike Brouwer - 2 years ago

  • Verantwoordelijkheid pakken in jouw eigen persoonlijke …

    Verantwoordelijkheid pakken in jouw eigen persoonlijke … Stephan Versteegh - 2 years ago

  • Tips voor als je gaat afstuderen

    Tips voor als je gaat afstuderen Bart Renders - 2 years ago

Data Discovery Channel

  • Explainable AI - Break open the blackbox

  • Toekomstvaste microservice data architecturen

  • Modern Data Platform

Nieuwsbrief

* verplichte velden

Contact

  • Head office NL
  • Kruisboog 42
  • 3905 TG Veenendaal
  • T +31 318 552020
  • Call
  • Mail
  • Directions
  • Head office BE
  • Generaal De Wittelaan 17
  • bus 30 2800 Mechelen
  • T +32 15 286370
  • Call
  • Mail
  • Directions

Follow us

  • Twitter
  • Facebook
  • Linkedin
  • Youtube

Newsletter

Sign in

Extra

  • Media Library
  • Disclaimer
  • Algemene voorwaarden
  • ISHBS Webmail
  • Extranet
Beheer cookie toestemming
Deze website maakt gebruik van Functionele en Analytische cookies voor website optimalisatie en statistieken.
Functioneel Always active
De technische opslag of toegang is strikt noodzakelijk voor het legitieme doel het gebruik mogelijk te maken van een specifieke dienst waarom de abonnee of gebruiker uitdrukkelijk heeft gevraagd, of met als enig doel de uitvoering van de transmissie van een communicatie over een elektronisch communicatienetwerk.
Voorkeuren
De technische opslag of toegang is noodzakelijk voor het legitieme doel voorkeuren op te slaan die niet door de abonnee of gebruiker zijn aangevraagd.
Statistieken
De technische opslag of toegang die uitsluitend voor statistische doeleinden wordt gebruikt. De technische opslag of toegang die uitsluitend wordt gebruikt voor anonieme statistische doeleinden. Zonder dagvaarding, vrijwillige naleving door uw Internet Service Provider, of aanvullende gegevens van een derde partij, kan informatie die alleen voor dit doel wordt opgeslagen of opgehaald gewoonlijk niet worden gebruikt om je te identificeren.
Marketing
De technische opslag of toegang is nodig om gebruikersprofielen op te stellen voor het verzenden van reclame, of om de gebruiker op een website of over verschillende websites te volgen voor soortgelijke marketingdoeleinden.
Manage options Manage services Manage vendors Read more about these purposes
Voorkeuren
{title} {title} {title}