Search Results

Showing results 1 to 13 of 13
Search took 0.01 seconds.
Search: Posts Made By: gravyboat
Forum: XML, XSLT and XPATH Oct 27th, 2008
Replies: 1
Views: 2,686
Posted By gravyboat
You can use the substring() functions as follows:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output...
Forum: XML, XSLT and XPATH Oct 27th, 2008
Replies: 2
Solved: Newbi error
Views: 862
Posted By gravyboat
Everything is correct, except you have a typo:
<xs:schema xmlns:xs="http://wwww.w3.org/2001/XMLSchema">


(one too many 'w's in the schema namespace declaration; should be 'www.w3.org').
Forum: XML, XSLT and XPATH Oct 27th, 2008
Replies: 2
Solved: new to xslt
Views: 891
Posted By gravyboat
Here is an XSLT that will do what you want.


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"...
Forum: XML, XSLT and XPATH Sep 18th, 2008
Replies: 1
Views: 1,624
Posted By gravyboat
See this: http://www.dpawson.co.uk/xsl/sect2/N6280.html#d9988e142 and this:http://www.dpawson.co.uk/xsl/sect2/N6461.html

Note that you can do some more efficient (and easier) sorting if you can...
Forum: XML, XSLT and XPATH Sep 18th, 2008
Replies: 1
Views: 869
Posted By gravyboat
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
...
Forum: XML, XSLT and XPATH Sep 9th, 2008
Replies: 3
Views: 1,808
Posted By gravyboat
The XPath will be the same, regardless of whether you're using XSLT or a programming language; just remove the expression from the "select" statements.

E.g.,

sum(/Students/Student//Marks)

...
Forum: XML, XSLT and XPATH Sep 8th, 2008
Replies: 3
Views: 1,808
Posted By gravyboat
(1) XPath has the sum() function; I'm not sure exactly what you're looking for, but if you want to display the total <marks>, you would write


<xsl:value-of select="sum(//marks)"/>


(2) XPath...
Forum: XML, XSLT and XPATH Sep 5th, 2008
Replies: 1
Views: 1,748
Posted By gravyboat
This should get you started:


<xsl:template match="ExecutionLog">
<xsl:value-of select="./LogHeader/@value"/>
<xsl:value-of select="./LogHeader/LogEntry/@value"/>

etc.

</xsl:template>
Forum: XML, XSLT and XPATH Sep 5th, 2008
Replies: 1
Views: 1,973
Posted By gravyboat
I'm not entirely sure what you're trying to do, but this should output what you want at the top:

<xsl:stylesheet exclude-result-prefixes="" version="1.0"...
Forum: XML, XSLT and XPATH Sep 5th, 2008
Replies: 1
Views: 1,203
Posted By gravyboat
Use

<xsl:value-of select="count(//row)"/>


Where "row" is the name of the element that represents a table row.
Forum: XML, XSLT and XPATH Sep 5th, 2008
Replies: 1
Views: 1,036
Posted By gravyboat
It's because you're asking for "all Item nodes that have a attrib of Dept/with value of Site Support, and also, the preceding nodes must not have duplicate category1 values."

...
Forum: XML, XSLT and XPATH Sep 5th, 2008
Replies: 1
Views: 1,784
Posted By gravyboat
You set your node to "nothing" before you append it:

Set node = dom.createNode(NODE_ELEMENT, "MessageDetails", DefaultNS)

Set node = Nothing
Forum: XML, XSLT and XPATH Sep 5th, 2008
Replies: 2
Views: 2,421
Posted By gravyboat
You should try using separate templates for each element. At the root level, start with

<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>


The "apply-templates/"...
Showing results 1 to 13 of 13

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC