Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Whats the Difference between XSL and XPath?

From: "Patrick.O.Ige" <naijacoder@-------.--->
To: NULL
Date: 8/2/2005 2:56:00 PM
Got you and thx for the explaination.
But now i have one question i have an XML below and an XSL to format it..
My problem is i'm using the TreeView WebControl to populate a Menu based on
the XML and XSL
so 'm using XML as the Datasource..
But i'm having some small isssues with my XSLT formatting because 'm trying
to format the XSL to have hyperlinks..
The hyperlink appears but no data is displayed

This is the part below where i have the problem the links appear but no data
is displayed
the value -of select doesn't seem to find the submenu node..
Any help what 'm doing wrong..

The XML the TreeViewMenu produces looks like this:-
 <TreeNode Text="" NavigateUrl="" target=""/>


<treenode>
<xsl:attribute name="NavigateURL">

<xsl:attribute name="text">
<xsl:value-of select="submenu" />
</xsl:attribute>

<xsl:attribute name="Target">_blank</xsl:attribute>

</xsl:attribute>

</treenode>



I have an XML:-
<?xml version="1.0" standalone="yes"?>
<root>
  <record>
    <aid>1</aid>
    <title>No Data</title>
    <submenu>No Data</submenu>
    <submenu1>http://gig/gig.aspx</submenu1>
  </record>
  <record>
    <aid>2</aid>
    <title>test</title>
    <submenu>test</submenu>
    <submenu1>test</submenu1>
  </record>
<record>
    <aid>3</aid>
    <title>test1</title>
    <submenu>test1</submenu>
    <submenu1>test1</submenu1>
  </record>
</root>

And an XSL:-
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version='1.0'>
  <xsl:template match="/root">
    <TREENODES>
      <xsl:for-each select="record">

     <treenode>
          <xsl:attribute name="text">
            <xsl:value-of select="title" />
          </xsl:attribute>

         <treenode>
            <xsl:attribute name="text">

<xsl:value-of select="submenu" />
  </xsl:attribute>

</treenode>


      <treenode>
            <xsl:attribute name="text">
<xsl:value-of select="submenu" />
            </xsl:attribute>
          </treenode>

<treenode>
<xsl:attribute name="NavigateURL">

<xsl:attribute name="text">
<xsl:value-of select="submenu" />
</xsl:attribute>

<xsl:attribute name="Target">_blank</xsl:attribute>

</xsl:attribute>

</treenode>
</treenode>
</xsl:for-each>

</TREENODES>
  </xsl:template>
</xsl:stylesheet>



"Dimitre Novatchev" <x@y...> wrote in message
news:42eee490$0$35727$892e7fe2@a......
>
> "Patrick.O.Ige" <naijacoder@h...> wrote in message
> news:O6LinHwlFHA.2860@T......
> > Whats the Difference between XSL and XPath?
> > And is XQuery the same as Xpath
> >
> >
>
> I guess by XSL you mean XSLT?
>
> These are three different languages.
>
> XPath is an expression language (defining XPath expressions) used to
> identify either a set of nodes belonging to one or more xml documents or
> just a value of a simple type such as an integer.
>
> XPath is imbedded in both XSLT and XQuery. In those languages it serves
the
> role of node-set identification (selection). Both XSLT and XQuery have
also
> other functions, such as creating nodes and documents.
>
>
> Cheers,
> Dimitre Novatchev
>
>




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent