Forum: XML, XSLT and XPATH Oct 27th, 2008 |
| Replies: 1 Views: 2,686 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 Views: 862 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 Views: 891 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 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 <?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 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 (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 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 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 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 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 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 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/"... |