473,387 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Nesting XSLT template and/or For-each to accomplish 3 levels


Hi All,

I used an article on XSLT and XML and creating a TOC written on the MSDN
CodeCorner.
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm

However, it did'nt quite answer all my questions.
How would one create a 3 level TOC when each item level / node was
differently named (They used Template match and for-each, but the template
match worked as on a 3 level structure they usedf the same named xml tags to
work with the the recursive properties of template matching,

TIA

--
Neal Rogers
University of Cape Town
Mar 23 '06 #1
6 1787
As the URL you posted doesn't work in my machine, could you put in some code
to illustrate your problem?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...

Hi All,

I used an article on XSLT and XML and creating a TOC written on the MSDN
CodeCorner.
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm

However, it did'nt quite answer all my questions.
How would one create a 3 level TOC when each item level / node was
differently named (They used Template match and for-each, but the template
match worked as on a 3 level structure they usedf the same named xml tags
to
work with the the recursive properties of template matching,

TIA

--
Neal Rogers
University of Cape Town

Mar 23 '06 #2
Hi

Have not got the code on me at the mo, on laptop back at home.
However, in the interim, I did find it on the MSDN Help
(ex VStudio.Net) Contents help
in
/WebDevelopment/HTML and Dynamic HTML/Columns/CodeCorner
called DXML: Taking a TOC from XML to DHTML
(where / depicts chapters or nodes in the help (contents) tree

Will however have code on the morrow (we're some 5 hours earlier than
Eastern Seaboard Time), ie end of day here.

thanks
Neal
--
Neal Rogers
University of Cape Town
"Kevin Spencer" wrote:
As the URL you posted doesn't work in my machine, could you put in some code
to illustrate your problem?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...

Hi All,

I used an article on XSLT and XML and creating a TOC written on the MSDN
CodeCorner.
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm

However, it did'nt quite answer all my questions.
How would one create a 3 level TOC when each item level / node was
differently named (They used Template match and for-each, but the template
match worked as on a 3 level structure they usedf the same named xml tags
to
work with the the recursive properties of template matching,

TIA

--
Neal Rogers
University of Cape Town


Mar 23 '06 #3
Morning

Heres the code snippet Current XML, XML iro my question and the XSLT
currently employed.

TIA
--
Neal Rogers
University of Cape Town
"Neal" wrote:
Hi

Have not got the code on me at the mo, on laptop back at home.
However, in the interim, I did find it on the MSDN Help
(ex VStudio.Net) Contents help
in
/WebDevelopment/HTML and Dynamic HTML/Columns/CodeCorner
called DXML: Taking a TOC from XML to DHTML
(where / depicts chapters or nodes in the help (contents) tree

Will however have code on the morrow (we're some 5 hours earlier than
Eastern Seaboard Time), ie end of day here.

thanks
Neal
--
Neal Rogers
University of Cape Town
"Kevin Spencer" wrote:
As the URL you posted doesn't work in my machine, could you put in some code
to illustrate your problem?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...

Hi All,

I used an article on XSLT and XML and creating a TOC written on the MSDN
CodeCorner.
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm

However, it did'nt quite answer all my questions.
How would one create a 3 level TOC when each item level / node was
differently named (They used Template match and for-each, but the template
match worked as on a 3 level structure they usedf the same named xml tags
to
work with the the recursive properties of template matching,

TIA

--
Neal Rogers
University of Cape Town


Mar 24 '06 #4
Morning

Heres the code,
XMl(current) and proposed/questioned and the XSLT which transforms it
currently.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">
<?xml:stylesheet type="text/xsl" href="listN.xsl"?>
<CategoriesList TYPE="Web Dev References">

<Categories>
<CategoryDescr>Vehicles</CategoryDescr>
<CategoryID>1</CategoryID>

<Categories>
<CategoryDescr>OnRoad</CategoryDescr>
<CategoriesID>1</CategoriesID>
<SubCategories>
<SubCategoryId>1</SubCategoryId>
<SubCatDescr>2ndHand</SubCatDescr>
<URL>MainAds.aspx?Vehicles?OnRoad?2ndHand</URL>
<SubCatId>1</SubCatId>
</SubCategories>
<SubCategories>
<SubCategoryId>2</SubCategoryId>
<SubCatDescr>New</SubCatDescr>
<URL>MainAds.aspx?Vehicles?OnRoad?New</URL>
<SubCatId>1</SubCatId>
</SubCategories>
</Categories>

<Categories>
<CategoryDescr>OffRoad</CategoryDescr>
<CategoriesID>2</CategoriesID>
<SubCategories>
<SubCategoryId>1</SubCategoryId>
<SubCatDescr>2ndHand</SubCatDescr>
<URL>MainAds.aspx?Vehicles?OffRoad?2ndHand</URL>
<SubCatId>1</SubCatId>
</SubCategories>
<SubCategories>
<SubCategoryId>2</SubCategoryId>
<SubCatDescr>New</SubCatDescr>
<URL>MainAds.aspx?Vehicles?OffRoad?New</URL>
<SubCatId>1</SubCatId>
</SubCategories>
</Categories>

</Categories>
</CategoriesList>

However had this been instead, Categories, SubCategories and SUbSubCategories
where either SubCategories or SUBSUBCategories could have a URL to an aspx
page with their respective parameters
ie,

<CategoriesList TYPE="Web Dev References">

<Categories>
<CategoryDescr>Vehicles</CategoryDescr>
<CategoryID>1</CategoryID>

<SUBCategories>
<SUBCategoryDescr>OnRoad</SUBCategoryDescr>
<SUBCategoriesID>1</SUBCategoriesID>
<SUBSubCategories>
<SUBSubCategoryId>1</SUBSubCategoryId>
<SUBSubCatDescr>2ndHand</SUBSubCatDescr>
<URL> MainAds.aspx?Vehicles?OnRoad?2ndHand</URL>
<SUBSubCatId>1</SUBSubCatId>
</SUBSubCategories>
..........
.........
.........
</SUBCategories>

<SUBCategories>
<SUBCategoryDescr>OnRoad</SUBCategoryDescr>
<SUBCategoriesID>1</SUBCategoriesID>

<URL> MainAds.aspx?Books?Fiction</URL>
</SUBCategories>

listN.xsl

<HTML>
<HEAD>
<TITLE>List <xsl:value-of select="CategoriesList/@TYPE" /></TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="list.css" />
<SCRIPT TYPE="text/javascript" LANGUAGE="javascript"
SRC="listN.js"></SCRIPT>
</HEAD>
<BODY>
<BUTTON ONCLICK="ShowAll('UL')">Show All</BUTTON>
<BUTTON ONCLICK="HideAll('UL')">Hide All</BUTTON>

<H1>List <xsl:value-of select="CategoriesList/@TYPE" /></H1>
<UL><xsl:apply-templates select="CategoriesList/Categories" /></UL>
<UL><xsl:apply-templates select="CategoriesList/Categories/SubCategories"
/></UL>

<!--- <P><BUTTON ONCLICK="window.alert(document.body.innerHTML);">V iew
HTML</BUTTON></P> -->
</BODY>
</HTML>
</xsl:template>

<xsl:template match="Categories">
<LI CLASS="clsHasKids"><xsl:value-of select="CategoryDescr" />
<UL>
<xsl:for-each select="SubCategories">
<LI>
<A TARGET="main">
<xsl:attribute name="HREF">
<xsl:value-of select="URL"/>
</xsl:attribute>
<xsl:value-of select="SubCatDescr" />
</A>
</LI>
</xsl:for-each>
<xsl:if test="Categories"><xsl:apply-templates /></xsl:if>

</UL>
</LI>
</xsl:template>

<!---
<xsl:template match="SubSubCategories">
<UL>
<xsl:for-each select="SubSubCatDescr">
<LI><xsl:apply-templates /></LI>
</xsl:for-each>
</UL>
</xsl:template>
-->

</xsl:stylesheet>
TIA

--
Neal Rogers
University of Cape Town
"Neal" wrote:
Hi

Have not got the code on me at the mo, on laptop back at home.
However, in the interim, I did find it on the MSDN Help
(ex VStudio.Net) Contents help
in
/WebDevelopment/HTML and Dynamic HTML/Columns/CodeCorner
called DXML: Taking a TOC from XML to DHTML
(where / depicts chapters or nodes in the help (contents) tree

Will however have code on the morrow (we're some 5 hours earlier than
Eastern Seaboard Time), ie end of day here.

thanks
Neal
--
Neal Rogers
University of Cape Town
"Kevin Spencer" wrote:
As the URL you posted doesn't work in my machine, could you put in some code
to illustrate your problem?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Neal" <Ne**@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...

Hi All,

I used an article on XSLT and XML and creating a TOC written on the MSDN
CodeCorner.
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm

However, it did'nt quite answer all my questions.
How would one create a 3 level TOC when each item level / node was
differently named (They used Template match and for-each, but the template
match worked as on a 3 level structure they usedf the same named xml tags
to
work with the the recursive properties of template matching,

TIA

--
Neal Rogers
University of Cape Town


Mar 24 '06 #5
Hi Neal,

I find it easy to think of XSL as an "XML Programming Language" of sorts.
That is, it has sequence, selection, and iteration, just as any prgramming
technology does. A Template is similar to a function, with the exception
that along with simply calling it, you can automate the calling of it, by
using <xsl:apply-templates /> without any arguments, in which the process of
the application of Templates begins at the current node and works downward
recursively from there. A Template name or Select condition is the
"signature" of the Template, and any node which matches the signature of the
Template will execute the Template for that node.

In this case, you have a top-level "Categories" node, which contains several
nodes with data about a given Category, and several "SubCategories" nodes,
in a similar structure to the "Categories" node.

If I understand you correctly, you want to extend this to include several
"SubSubCategories" nodes under each "SubCategories" node, to indicate a
further level of nesting.

So, let's analyze the first Template:

This Template is called at the top level by <xsl:apply-templates
select="CategoriesList/Categories" />

That indicates that all nodes under the "CategoriesList" node, with node
names matching "Categories" should be processed by the matching Template (or
"function," as it were).

<xsl:template match="Categories">
<LI CLASS="clsHasKids"><xsl:value-of select="CategoryDescr" />
<UL>
<xsl:for-each select="SubCategories">
<LI>
<A TARGET="main">
<xsl:attribute name="HREF">
<xsl:value-of select="URL"/>
</xsl:attribute>
<xsl:value-of select="SubCatDescr" />
</A>
</LI>
</xsl:for-each>
<xsl:if test="Categories"><xsl:apply-templates /></xsl:if>

</UL>
</LI>
</xsl:template>

What this Template does with SubCategories nodes is handles with
<xsl:for-each select="SubCategories">

Each node within that node contains instructions for adding HTML List Items
to the page, for the various nodes under each "SubCategories" node.

At the end of the Template is this instruction: <xsl:if
test="Categories"><xsl:apply-templates /></xsl:if>

This allows Categories to be contained within other Categories. In other
words, it allows for an infinite recursion of Categories within Categories
within Categories, if desired. By testing each node under a given
"Categories" node, and calling "apply-templates" with no parameters, it will
apply any template that has a name of "Categories" to any node under a given
"Categories" node, which, of course, is the current Template. It is like a
recursive function.

Now, it is important to remember that this is a demonstration or example,
and not supposed to represent any real-life situation. After all, it hardly
makes sense for there to be a node called "SubCategories" when any Category
can, in essence, be a sub-category of any other Category. But it does
illustrate several XSL concepts, including several applications of
Templates, and recursion.

I'm a bit confused about this line, though:

<UL><xsl:apply-templates
select="CategoriesList/Categories/SubCategories"/>

It really does nothing, as all the SubCategories are processed under each
"Categories" node. By the time it reaches this line, the entire XML document
has been processed. It has the effect of adding

<UL></UL>

to the page.

Now, again, for the purpose of self-education, I suppose, you want to add
another level below the "SubCategories" level, with a different name
"SubSubCategories." This is where we talk about the various ways to skin an
XSL cat.

One can use loops or Templates in various situations. I suppose the real
question is, which is most efficient for the particular task? The example
uses both, Templates at the top level, and a loop at the bottom level, which
eliminates the need for another Template. I will follow the same example,
and change the inner loop in the Template to another Template call. The
other Template is much like the first, with a loop for "SUBSubCategories" as
this is now the bottom-most node in the tree:

<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>
List <xsl:value-of select="CategoriesList/@TYPE" />
</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="list.css" />
</HEAD>
<BODY>

<H1>
List <xsl:value-of select="CategoriesList/@TYPE" />
</H1>
<UL>
<xsl:apply-templates select="CategoriesList/Categories" />
</UL>
<UL>
<xsl:apply-templates select="CategoriesList/Categories/SubCategories"/>
</UL>

<!--- <P><BUTTON ONCLICK="window.alert(document.body.innerHTML);">V iew
HTML</BUTTON></P> -->
</BODY>
</HTML>
</xsl:template>

<xsl:template match="Categories">
<LI CLASS="clsHasKids">
<xsl:value-of select="CategoryDescr" />
<xsl:apply-templates select="SubCategories"/>
</LI>
<xsl:if test="Categories">
<xsl:apply-templates />
</xsl:if>
</xsl:template>

<xsl:template match="SubCategories">
<UL>
<LI CLASS="clsHasKids">
<xsl:value-of select="SubCatDescr" />
<xsl:if test="SUBSubCategories">
<UL>
<xsl:for-each select="SUBSubCategories">
<LI>
<A TARGET="main">
<xsl:attribute name="HREF">
<xsl:value-of select="URL"/>
</xsl:attribute>
<xsl:value-of select="SUBSubCatDescr" />
</A>
</LI>
</xsl:for-each>
<xsl:if test="SubCategories">
<xsl:apply-templates />
</xsl:if>

</UL>
</xsl:if>
</LI>
</UL>
</xsl:template>

Let me know if you have any other questions.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

Hi

Have not got the code on me at the mo, on laptop back at home.
However, in the interim, I did find it on the MSDN Help
(ex VStudio.Net) Contents help
in
/WebDevelopment/HTML and Dynamic HTML/Columns/CodeCorner
called DXML: Taking a TOC from XML to DHTML
(where / depicts chapters or nodes in the help (contents) tree

Will however have code on the morrow (we're some 5 hours earlier than
Eastern Seaboard Time), ie end of day here.

thanks
Neal
--
Neal Rogers
University of Cape Town
"Kevin Spencer" wrote:
> As the URL you posted doesn't work in my machine, could you put in some
> code
> to illustrate your problem?
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> Professional Numbskull
>
> Show me your certification without works,
> and I'll show my certification
> *by* my works.
>
> "Neal" <Ne**@discussions.microsoft.com> wrote in message
> news:3F**********************************@microsof t.com...
> >
> > Hi All,
> >
> > I used an article on XSLT and XML and creating a TOC written on the
> > MSDN
> > CodeCorner.
> > ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm
> >
> > However, it did'nt quite answer all my questions.
> > How would one create a 3 level TOC when each item level / node was
> > differently named (They used Template match and for-each, but the
> > template
> > match worked as on a 3 level structure they usedf the same named xml
> > tags
> > to
> > work with the the recursive properties of template matching,
> >
> > TIA
> >
> > --
> > Neal Rogers
> > University of Cape Town
>
>
>

Mar 24 '06 #6
Awesome,
Appreciate the explanation.
Thanks
Neal
--
Neal Rogers
University of Cape Town
"Kevin Spencer" wrote:
Hi Neal,

I find it easy to think of XSL as an "XML Programming Language" of sorts.
That is, it has sequence, selection, and iteration, just as any prgramming
technology does. A Template is similar to a function, with the exception
that along with simply calling it, you can automate the calling of it, by
using <xsl:apply-templates /> without any arguments, in which the process of
the application of Templates begins at the current node and works downward
recursively from there. A Template name or Select condition is the
"signature" of the Template, and any node which matches the signature of the
Template will execute the Template for that node.

In this case, you have a top-level "Categories" node, which contains several
nodes with data about a given Category, and several "SubCategories" nodes,
in a similar structure to the "Categories" node.

If I understand you correctly, you want to extend this to include several
"SubSubCategories" nodes under each "SubCategories" node, to indicate a
further level of nesting.

So, let's analyze the first Template:

This Template is called at the top level by <xsl:apply-templates
select="CategoriesList/Categories" />

That indicates that all nodes under the "CategoriesList" node, with node
names matching "Categories" should be processed by the matching Template (or
"function," as it were).

<xsl:template match="Categories">
<LI CLASS="clsHasKids"><xsl:value-of select="CategoryDescr" />
<UL>
<xsl:for-each select="SubCategories">
<LI>
<A TARGET="main">
<xsl:attribute name="HREF">
<xsl:value-of select="URL"/>
</xsl:attribute>
<xsl:value-of select="SubCatDescr" />
</A>
</LI>
</xsl:for-each>
<xsl:if test="Categories"><xsl:apply-templates /></xsl:if>

</UL>
</LI>
</xsl:template>

What this Template does with SubCategories nodes is handles with
<xsl:for-each select="SubCategories">

Each node within that node contains instructions for adding HTML List Items
to the page, for the various nodes under each "SubCategories" node.

At the end of the Template is this instruction: <xsl:if
test="Categories"><xsl:apply-templates /></xsl:if>

This allows Categories to be contained within other Categories. In other
words, it allows for an infinite recursion of Categories within Categories
within Categories, if desired. By testing each node under a given
"Categories" node, and calling "apply-templates" with no parameters, it will
apply any template that has a name of "Categories" to any node under a given
"Categories" node, which, of course, is the current Template. It is like a
recursive function.

Now, it is important to remember that this is a demonstration or example,
and not supposed to represent any real-life situation. After all, it hardly
makes sense for there to be a node called "SubCategories" when any Category
can, in essence, be a sub-category of any other Category. But it does
illustrate several XSL concepts, including several applications of
Templates, and recursion.

I'm a bit confused about this line, though:

<UL><xsl:apply-templates
select="CategoriesList/Categories/SubCategories"/>

It really does nothing, as all the SubCategories are processed under each
"Categories" node. By the time it reaches this line, the entire XML document
has been processed. It has the effect of adding

<UL></UL>

to the page.

Now, again, for the purpose of self-education, I suppose, you want to add
another level below the "SubCategories" level, with a different name
"SubSubCategories." This is where we talk about the various ways to skin an
XSL cat.

One can use loops or Templates in various situations. I suppose the real
question is, which is most efficient for the particular task? The example
uses both, Templates at the top level, and a loop at the bottom level, which
eliminates the need for another Template. I will follow the same example,
and change the inner loop in the Template to another Template call. The
other Template is much like the first, with a loop for "SUBSubCategories" as
this is now the bottom-most node in the tree:

<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>
List <xsl:value-of select="CategoriesList/@TYPE" />
</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="list.css" />
</HEAD>
<BODY>

<H1>
List <xsl:value-of select="CategoriesList/@TYPE" />
</H1>
<UL>
<xsl:apply-templates select="CategoriesList/Categories" />
</UL>
<UL>
<xsl:apply-templates select="CategoriesList/Categories/SubCategories"/>
</UL>

<!--- <P><BUTTON ONCLICK="window.alert(document.body.innerHTML);">V iew
HTML</BUTTON></P> -->
</BODY>
</HTML>
</xsl:template>

<xsl:template match="Categories">
<LI CLASS="clsHasKids">
<xsl:value-of select="CategoryDescr" />
<xsl:apply-templates select="SubCategories"/>
</LI>
<xsl:if test="Categories">
<xsl:apply-templates />
</xsl:if>
</xsl:template>

<xsl:template match="SubCategories">
<UL>
<LI CLASS="clsHasKids">
<xsl:value-of select="SubCatDescr" />
<xsl:if test="SUBSubCategories">
<UL>
<xsl:for-each select="SUBSubCategories">
<LI>
<A TARGET="main">
<xsl:attribute name="HREF">
<xsl:value-of select="URL"/>
</xsl:attribute>
<xsl:value-of select="SUBSubCatDescr" />
</A>
</LI>
</xsl:for-each>
<xsl:if test="SubCategories">
<xsl:apply-templates />
</xsl:if>

</UL>
</xsl:if>
</LI>
</UL>
</xsl:template>

Let me know if you have any other questions.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

Hi

Have not got the code on me at the mo, on laptop back at home.
However, in the interim, I did find it on the MSDN Help
(ex VStudio.Net) Contents help
in
/WebDevelopment/HTML and Dynamic HTML/Columns/CodeCorner
called DXML: Taking a TOC from XML to DHTML
(where / depicts chapters or nodes in the help (contents) tree

Will however have code on the morrow (we're some 5 hours earlier than
Eastern Seaboard Time), ie end of day here.

thanks
Neal
--
Neal Rogers
University of Cape Town
"Kevin Spencer" wrote:

> As the URL you posted doesn't work in my machine, could you put in some
> code
> to illustrate your problem?
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> Professional Numbskull
>
> Show me your certification without works,
> and I'll show my certification
> *by* my works.
>
> "Neal" <Ne**@discussions.microsoft.com> wrote in message
> news:3F**********************************@microsof t.com...
> >
> > Hi All,
> >
> > I used an article on XSLT and XML and creating a TOC written on the
> > MSDN
> > CodeCorner.
> > ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm
> >
> > However, it did'nt quite answer all my questions.
> > How would one create a 3 level TOC when each item level / node was
> > differently named (They used Template match and for-each, but the
> > template
> > match worked as on a 3 level structure they usedf the same named xml
> > tags
> > to
> > work with the the recursive properties of template matching,
> >
> > TIA
> >
> > --
> > Neal Rogers
> > University of Cape Town
>
>
>


Mar 27 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sergio del Amo | last post by:
Hi, I use the xslt functions provided by php. I am running in my computer the package xampp(www.apachefriends.org) which includes php/apache/mysql .. In this package the php includes the sablotron...
1
by: Mohit | last post by:
Hi Friends I have to call 1 of the 2 child XSLT files from the Main XSLT file based on some criteria. I want one child XSLT file will be executed by version 1 of XSLT processor and the other by...
8
by: Maciej Wegorkiewicz | last post by:
Hi, I have small experience in XSLT processing and I have a problem which I cannot solve. Can you look at it? I have an input file containing info about bank accounts like this: (...) <acc...
12
by: gipsy boy | last post by:
Hello, I have sort of a big problem. I would really appreciate any help you could give me. I made a web service in C++ that throws XML to the client (browser). But, the XSLT transormation...
4
by: Moogy | last post by:
I'm pulling my hair out here. First, I'm new to XML, so that doesn't help, but none of this makes any sense to me. All I'm trying to do is take a simple source XML file and translate it with an...
3
by: Philipp Schumann | last post by:
Hi, I have several nested layers of <node> element that are processed by an XSLT template. Is there any possibility to determine the depth of a node in the overall nesting hierarchy? For...
3
by: Ian Roddis | last post by:
Hello, I want to embed SQL type queries within an XML data record. The XML looks something like this: <DISPLAYPAGE> <FIELD NAME="SERVER" TYPE="DROPDOWN"> <OPTION>1<OPTION> <OPTION>2<OPTION>...
4
by: kl.vanw | last post by:
I would like to count the nesting level in template classes. How can I make the following work? #include <assert.h> template <class T> class A { public: A() { // what goes here?
3
by: Carles Company Soler | last post by:
Hello, I want to calculate the value of an attribute. For example <rect x="2+3" y="12"and be <rect x="5" y="12">. Is it possible using XSLT? Thanks!
8
by: Hercules Dev. | last post by:
Hi all, I'm new in xslt and xpath, so my question might be simple but i'm learning. I have an XML document and need to transform it into another XML, I use xslt and it works, but there is a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.