Copied to clipboard

Flag this post as spam?

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


  • praveity 100 posts 125 karma points
    May 17, 2011 @ 06:21
    praveity
    0

    Xpath query to list all the properties of the doctype

    Hi

    Is it possible to have a xpath code to list all the properties of the specific document type??

    e.g.

    If doctype "Home" has 3 propeties title,content, logo. Then I want to get all these 3 properties on xpath expression.

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    May 17, 2011 @ 07:38
    Chriztian Steinmeier
    0

    Hi praveity,

    The properties are stored as childnodes of the Document Type, so you can just select all childnodes and filter out any child Document Types (if the page has subpages):

    <xsl:for-each select="$currentPage/*[not(@isDoc)]">
        <p><xsl:value-of select="name(.)" />: <xsl:value-of select="." /></p>
    </xsl:for-each>

    /Chriztian 

Please Sign in or register to post replies

Write your reply to:

Draft