Copied to clipboard

Flag this post as spam?

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


  • christos 3 posts 23 karma points
    Dec 09, 2011 @ 11:46
    christos
    0

    Accessing a property from the master document type

    Hello, I am trying to figure out the xslt syntax for getting the value of a property that belongs to the master document type of a node. Something like <xsl:value-of select="propName"/> appears to work only for properties that belong to the document type itself, and not the document type I am inheriting from (the master document type).

    Thank you.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Dec 09, 2011 @ 12:21
    Dirk De Grave
    0

    christos,

    it *should* work that way. Properties defined on the parent document type should also be available on the child doc, and therefore also in the cached xml using the syntax from your post.

    Are you sure prop exists on the parent document type?

     

    Cheers,

    /Dirk

  • Kim Andersen 1447 posts 2197 karma points MVP
    Dec 09, 2011 @ 17:40
    Kim Andersen
    0

    Hi Christos

    I'm not quite sure why your example works unless you're inside some kind of loop (for each og apply-templates). You should include $currentPage as well I think.

    Like this:

    <xsl:value-of select="$currentPage/propertyAlias" />

    Does it help in any way to include the currentPage variable?

    /Kim Andersen

  • christos 3 posts 23 karma points
    Dec 09, 2011 @ 20:03
    christos
    0

    I tried some more tests and realised the problem was the font I was using. When I tried @id instead of a property, it worked, so I assumed the problem was the master document type, but infact it was because the font supported numerals (for @id) but not the characters I was using in the custom property.

    My apologies, and thank you for your help.

  • Kim Andersen 1447 posts 2197 karma points MVP
    Dec 12, 2011 @ 08:42
    Kim Andersen
    0

    Ahh, weird, but great that you got it solved Christos. I would never have thought of that as the problem :)

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft