Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • João Acabado 4 posts 55 karma points
    Mar 17, 2012 @ 20:19
    João Acabado
    1

    Document Type Derivation

    Hi guys,

    Do you ever had the need to check if a given doc type is a derivation of another doc type? That can come useful if you want to treat a node differently or if you want to make sure a node has some properties. 

    There are many ways to do it but if you do it at runtime you can get in some performance problems. I'm trying to solve this problem and to do that I've just developed a T4 template that creates a Helper class with all the necessary logic and performs really fast, as fast as a bitwise operation.

    There is one problem with this approach that is that this helper classes need to be updated whenever there is a doc type structure change, and to update it you need to re-run the T4 template and then build the generated file. So this only applies to the scenarios where you have development environment that mirrors your production environment.

    Anybody interested in this problem? Any ideas? Drop me a line and I will gladly send you what I've made.

Please Sign in or register to post replies

Write your reply to:

Draft