Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Using this example:
<xsl:for-each select="$currentPage/*[not(self::NewsItem)]"></xsl:for-each>
I can see how to check the current pages child document type aliases.
How do I get the current pages document type alias? I want to use this in an xsl:if like this:
<xsl:if test="$currentPage/@nodeName = 'whatever'> </xsl:if>
That works for node name but I can't seem to figure out how to get the document type alias.
Hey Jim,
try using the function "name()", it gives the element name of the curren node. Wich is the document type aliasso that would be:
<xsl:if test="name($currentPage) = 'whatever'"></xsl:if>
Hi Jim,
Since you reference an example using the self:: axis, here's an explanation of how to use that for $currentPage:
<xsl: if test="$currentPage/self::whatever">...</xsl:test>
Note that when you use the name() function you have to supply a string, but using the self:: axis you can't (just omit the apostrophes).
- That said, you'll need to use the name() function if you're testing against a value in a variable.
/Chriztian
Thanks guys! The name() function is exactly what I needed.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How do I check the current pages docTypeAlias in 4.5?
Using this example:
I can see how to check the current pages child document type aliases.
How do I get the current pages document type alias? I want to use this in an xsl:if like this:
That works for node name but I can't seem to figure out how to get the document type alias.
Hey Jim,
try using the function "name()", it gives the element name of the curren node. Wich is the document type alias
so that would be:
Hi Jim,
Since you reference an example using the self:: axis, here's an explanation of how to use that for $currentPage:
Note that when you use the name() function you have to supply a string, but using the self:: axis you can't (just omit the apostrophes).
- That said, you'll need to use the name() function if you're testing against a value in a variable.
/Chriztian
Thanks guys! The name() function is exactly what I needed.
is working on a reply...