Jump to content

nrawat2005

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About nrawat2005

  • Rank
    Newbie
  • Birthday 07/19/1978

Previous Fields

  • Languages
    Hindia, Enlish

Contact Methods

  • MSN
    nrawat2005
  • Skype
    nrawat2005

Profile Information

  • Location
    Delhi
  • Interests
    XSLT, XML, XQUERY, XSLFO, MarkLogic, Ant Script, DTD, Schema
  1. Try this one with 2.0:<?xml version="1.0" ?><xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> <XML> <xsl:apply-templates/> </XML></xsl:template> <xsl:template match="TAG1 | TAG2"> <LINE> <xsl:analyze-string select="text()" regex="([a-zA-Z0-9]+)("> <xsl:matching-substring> <xsl:choose> <xsl:when test=".[position() = 1]"> <TAG1><xsl:value-of select="replace(.,';','')"/></TAG1> </
  2. Try this one:<?xml version="1.0" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><xsl:template match="S:Body"> <xsl:variable name="firstChildName" select="child::*[1]/name()"/> <xsl:variable name="firstChildNameSpace" select="namespace-uri(child::*[1])"/> ChildName := <xsl:value-of select="$firstChildName"/> ChildNameSpace := <xsl:value-of select="$firstChildNameSpace"/></xsl:template></xsl:stylesheet>
  3. The problem is in your <xsl:param name="list" /> where you are not selecting/poining to anything and you are checking it into choose which is always returning otherwise. Here is the solution:<?xml version="1.0" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="4.0" /> <!-- start of root template --> <xsl:template match="/"> <html> <head> <title>Car Sales</title> </head> <body> <table border="1" cellpadding="5" cellspa
×
×
  • Create New...