Jump to content

Search the Community

Showing results for tags 'choose'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 3 results

  1. Hi folks, Would love to get some assistance with some basic XSLT coding for a template/choose or transform. I have the following XSLT coding which is used to essentially transform (replace) the subject line of an email which is generated by the system. This small section of text allows me to put in the company name to be used in the "Value of select" and this I can kind of follow. XSLT Template/Code <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> <xsl:template match="//*[local-name() = 'ReportHeader']/*[local-name() = 'Note']"> <Note> <xsl:attribute name="author">email</xsl:attribute> <xsl:attribute name="entryDateTime"><xsl:value-of select="./@entryDateTime"/></xsl:attribute> <xsl:attribute name="languageID">en-US</xsl:attribute> <xsl:attribute name="status">Open</xsl:attribute> <xsl:attribute name="type">SubjectLine</xsl:attribute> <xsl:attribute name="use">External</xsl:attribute> <xsl:value-of select="concat('Company 1000 - ',.)"/> </Note> </xsl:template> This is the section of the XML that the above template is modifying <Note author="user id" entryDateTime="2018-02-15T22:46:13Z" languageID="en-US" status="Open" type="SubjectLine" use="External">Acknowledgement for 219-00</Note> When testing the output it successfully changes the above to the following <Note author="email" entryDateTime="2018-02-15T22:46:13Z" languageID="en-US" status="Open" type="SubjectLine" use="External">Company 1000 - Acknowledgement for 219-00</Note> (This is the section of the XML code that refers to the "Report Header" and has the accounting entity in the document ID) <ReportHeader> <DocumentID> <ID accountingEntity="1000" variationID="1012">Acknowledgement_219-00</ID> </DocumentID> In some instances we have multiple accounting entities and what I would love to be able to do is have some XSLT code to "choose" between the various Accounting Entities and apply the above template (with different names for each accounting entities).Or at the min is there a way of saying when accounting entity = value choose "template a" which for example would be Company 1000 or choose "template b" and the value would be Company 2000 (for example) What would be the best way to edit/write this to be able to have, essentially, a different Company name in the subject line that corresponds to the relative Accounting Entity ID? Thanks in advance, Steve
  2. I am trying to apply <href> links to only top root nodes of my tab navigation by testing for if they have child nodes. If they have children they should not get a link assigned to them, but I want all subsuquent parents (those in nested <ul> that have children) to have links. Here is the location of my test page: https://edit-www.rose-hulman.edu/offices-services/alumni-affairs-2.aspx You can see from the first tab dropdown the problem I am having. Under "Alumni Affairs", which has no link assigned to it, as it shouldn't, there is "Young Alumni Counsel" . This node needs to have a link assigned to it, but it won't ever get one because the xslt "choose" is not restrictive to the" / " node but applies to all the child nodes as well. So if I need to add any other nodes under any of child nodes they will no longer link to a page because they are now parents. Thanks for all your help. I am using the CMS Umbraco and ver. 1.0 xml. Here is my xslt: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets "><xsl:output method="xml" omit-xml-declaration="yes"/><xsl:param name="currentPage"/><xsl:template match="/"> <xsl:variable name="home" select="$currentPage/ancestor-or-self::Category2HomePage" /> <xsl:variable name="nav" select="$home/*[@isDoc and string(umbracoNaviHide)!=1]" /> <ul> <xsl:if test="string($home/useAlternateNavigation) = '1'"> <xsl:attribute name="class">alt-nav</xsl:attribute> </xsl:if> <xsl:for-each select="$nav"> <li> <!-- this craziness allows IE to lay subnavs on top of top nav elements if they break onto two lines --> <xsl:attribute name="style">z-index:<xsl:value-of select="count($nav)-position()+1" />;</xsl:attribute> <xsl:attribute name="class"> <xsl:if test="$currentPage/ancestor-or-self::*[@isDoc and name()!='Category2HomePage' and @id=current()/@id]"> <xsl:text>active</xsl:text> </xsl:if> <xsl:text> </xsl:text> <xsl:if test="count($nav)=position()"> <xsl:text>last</xsl:text> </xsl:if> </xsl:attribute> <xsl:call-template name="node-link-with-span"> <xsl:with-param name="node" select="current()" /> </xsl:call-template> <xsl:variable name="subnodes" select="* [@isDoc and string(umbracoNaviHide)!=1]" /> <xsl:if test="$subnodes"> <ul> <xsl:for-each select="$subnodes"> <li> <xsl:if test="position()=1"> <xsl:attribute name="class">first</xsl:attribute> </xsl:if> <xsl:call-template name="node-link-with-span"> <xsl:with-param name="node" select="current()" /> </xsl:call-template> </li> </xsl:for-each> </ul> </xsl:if> </li> </xsl:for-each> </ul> <xsl:if test="string($home/useAlternateNavigation) != '1'"> <img src="/static/phase2/tabNavBorderBottom.jpg" class="tabBorder" /> </xsl:if></xsl:template> <xsl:template name="node-link-with-span"> <xsl:param name="node" /> <xsl:if test="string($node) != ''"> <a> <xsl:attribute name="href"> <xsl:choose> <!--HERE IS THE PROBLEM TEST --> <xsl:when test="count($node/* [@isDoc and string(umbracoNaviHide) != '1'])"> <xsl:text>javascript://</xsl:text> </xsl:when> <xsl:when test="$node[name() = 'ExternalLink']"> <xsl:value-of select="$node/url" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="umbraco.library:NiceUrl($node/@id)" /> </xsl:otherwise> </xsl:choose> </xsl:attribute> <span> <xsl:call-template name="node-name"> <xsl:with-param name="node" select="$node" /> </xsl:call-template> </span> </a> </xsl:if></xsl:template> <!-- A template to output the correct name for a given node. Better than copy/pasting this code all over the place --><xsl:template name="node-name"> <xsl:param name="node" /> <xsl:if test="string($node) != ''"> <xsl:choose> <xsl:when test="$node/pageTitle != ''"> <xsl:value-of select="$node/pageTitle"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$node/@nodeName"/> </xsl:otherwise> </xsl:choose> </xsl:if></xsl:template></xsl:stylesheet>
  3. <xsl:variable name="test" select="'ohhi'"/><xsl:variable name="sections" select="/QUERY_MODULE/CRITERIA/SECTIONS"/> <xsl:variable name="sections3"> <xsl:choose> <xsl:when test="$test='ohhi'"><xsl:value-of select="$sections"/></xsl:when> <xsl:otherwise><xsl:value-of select="$sections"/></xsl:otherwise> </xsl:choose></xsl:variable> sections3 and sections should have the same results but they do not. obviously this is pointless code. the original code was not working, so i reduced it to isolate the problem. any help is appreciated
×