Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About dies_felices

  • Rank

Profile Information

  • Location
  1. Hi. I hope this helps. Based on the XML:- <?xml version = '1.0' encoding = 'ISO-8859-1'?><?xml-stylesheet type="text/xsl" href="Question2.xslt"?><base><parent><child>blah blah blah</child><abcd>efghijkl</abcd></parent><parent><child>oh my</child><abcd>mnopqrstuv</abcd></parent></base> The XSLT:- <?xml version = '1.0' encoding = 'ISO-8859-1'?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"><xsl:output method="html"/><xsl:template match="/">&l
  2. Hi. I've been following your Javascript suggestion this has led me to http://www.w3.org/TR/xslt11/#ecmascript-binding. <?xml version = '1.0' encoding = 'ISO-8859-1'?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rand="~/" version="1.1"><xsl:output method="html" omit-xml-declaration="yes"/><xsl:script implements-prefix="rand"language="ecmascript">function num() {var thisResult = parseInt(Math.random()*100);return thisResult;}</xsl:script><xsl:template match="/"><xsl:value-of select="rand:num()"/></xsl:template></xsl:s
  3. Hi everyone. Is it possible to get date and time information from the server and to process that information in XSLT? I would like to render a different page for a different day or after a particular time or until a time. Since I can't control the client terminal I can't rely upon it to have the right date or time. <root> <Schedule day="Monday" date="2012.01.09"> <Some_Data /> </Schedule> <Schedule day="Tuesday" date="2012.01.10"> <Some_Data /> </Schedule></root> Please help. --Many thanks. Stephen.
  4. Hi. Please try this. The mode attribute of the template select statement allows you create multiple templates for the same XPath, that is my crude understanding anyway. I hope it helps you. <?xml version = '1.0' encoding = 'ISO-8859-1'?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="html" omit-xml-declaration="yes"/><xsl:template match="/"><html lang="en"><head></head><body><table border="1"><xsl:apply-templates select="ROOT/EmployeeTax/EmployeeTaxCode" mode="column-title"/><
  5. Hi. Alternatively, <?xml version = '1.0' encoding = 'ISO-8859-1'?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml"/><xsl:template match="/"><strings><xsl:apply-templates select="AnswerSet/Answer"/></strings></xsl:template><xsl:template match="Answer"><string>"<xsl:value-of select="text()"/>"</string></xsl:template></xsl:stylesheet>
  6. Hi. There are probably better ways to do it. I hope this helps. I'm assuming the XML will look something like this to allow many strings:- <strings><string>Walking Dead</string></strings> <?xml version = '1.0' encoding = 'ISO-8859-1'?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml"/><xsl:template match="/"><xsl:text><strings></xsl:text><xsl:apply-templates select="strings/string"/><xsl:text></strings></xsl:text></xsl:template> <xsl:tem
  • Create New...