Jump to content

maveric2k2

Members
  • Posts

    2
  • Joined

  • Last visited

maveric2k2's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hello boen_robot!Ok. , let me explain this:I only want to load an other XML when i process XML1. I like to have a complete copy of the XML2 into a new node!? After that i want to access this node and handle it like the XML1 root node.like this:newnode = load XML2$newnode/name$newnode/blablaxsl:apply-templates select="$newnode/params...Bye,mav
  2. Hello!I already have an XML and a matching XSL. Now i have the following problem:XML1 ?XML2 | | \/ \/ XSL | \/ HTML / otherI have successfully used the following lines:<xsl:variable name="hxml">./<xsl:value-of select="$p_libname" />/<xsl:value-of select="module/mname" />_hier.xml</xsl:variable><xsl:variable name="hroot_nm"><xsl:value-of select="document($hxml)/hier_module/name"/></xsl:variable>output_name: <xsl:value-of select="$hroot_nm" />==================output_name: blablaNow everything works fine, but when the XML2 file is missing i've got an error.How can i prevent the "file not found error"?I've tempted the following:<xsl:if test="document($hxml)"> <xsl:variable name="hroot_nm"><xsl:value-of select="document($hxml)/hier_module/name"/></xsl:variable> <xsl:value-of select="$hroot_nm" /></xsl:if>The error still occure! ======================================================================By the way, is it possible to link a variable to the XML2 root?like:<xsl:variable name="hxml">./<xsl:value-of select="$p_libname" />/<xsl:value-of select="module/mname" />_hier.xml</xsl:variable><xsl:variable name="hroot"><xsl:value-of select="document($hxml)"/></xsl:variable>name: <xsl:value-of select="$hroot/hier_module/name" />description: <xsl:value-of select="$hroot/hier_module/description" />params: <xsl:apply-templates select="$hroot/hier_module/params" />========name: blabladescription: blablaparams: bla1, bla2, bla3, ...thx, mav.
×
×
  • Create New...