Hi!
I would like to categorize results from an XPath under headings by element name (and then by same attribute names). Note: XML data could be inconsistent and some elements with the same name could have different attributes, therefore they need different headings.
I can't seem to write out my problem in words, so it might be best to...
I need to generate a runtime error in an xslt. How to do so?
The following xpaths do not generate runtime errors:
"1 div 0"
"/*/*[1 div 0]"
"/*/*[0]"
"/*/*[NaN]"
It does not have to be done using xpath, could be done using some xslt construct.
The reason I want this is to effectively have a "NotImplementedException" in my xslt. T...
Hi,
I have a question: relative path problem with Firefox..
I've the folder Order with the order.xml
an other folder is Source with code.xsl
In order.xml I've the string:
<?xml-stylesheet type="text/xsl" href="../Source/deliveryNote.xsl"?>
With IE all right but, Firefox not ok!
Thanks!
Gb
...
Hi All,
I have this following doubt in xslt coding.
my input is : <text><p>some text</p> <p/>some text <emph>....</emph>.........<p/> </text>
And the output that i need is
<text><p>some text</p><p>some text <emph>....</emph>.........</p></text>
How am i supposed to map the values present between two empty "p" tags in to a non...
Some colleagues and I were comparing past languages we had programmed in and were chuckling about our experience with VBScript with its odd features such as 1-based index instead of 0-based indexes like almost every other language has, the reasoning being that it was a language for users (e.g. Excel VBA) instead of a language for develop...
His,
I think I've got a tricky questions for XPath experts. There is a node structure like this:
A(1)-|
|-B(1)
|-B(2)
|-B(3)
A(2)-|
|-B(2.1)
|-B(2.2)
|-B(2.3)
...
How to, with a single XPath-expression, extract only the following nodes
A(1)-|
|-B(2)
|-B(3)
A(2)-|
|-B(2.2)
|-B(2.3)
...
I have an xml with img tag
<img>
source
</img>
I want to generate:
<img src="source.jpg">
I tried something like that:
<img>
<xsl:attribute name="src">
<xsl:text>
<xsl:value-of select="node()" />.jpg
</xsl:text>
</xsl:attribute>
</img>
but it doesng work
...
I'm coding my first website using XML+XSL. The xml I am transforming have this section:
<page>
<news>
<highlights>
<entry>
<mini>x_thumb.jpg</mini>
<title>title</title>
<text>text</text>
<image>x.jpg</image>
<link>x.html</link>
...
Given a document containing these tags, how can I tell whether " " < "H" < "z" in the document's encoding? I'm trying to do this in XPath 1.0.
<text>H</text>
<range>
<from> </from>
<to>z</to>
</range>
I might even be able to get away with using contains(), but then how would I create a string containing the characters from "...
Hello, I found solution for subj related to the Visual Studio XSLT processor:
public class XsltListFilesExtension
{
public XPathNodeIterator ListFiles(string directoryPath)
{
XmlDocument doc = new XmlDocument();
doc.AppendChild(doc.CreateElement("files"));
DirectoryInfo di = ne...
first off hello
Ok my question, i am trying to develope a open source shopping cart, which uses xml for storage and xsl to style the basket
1, my xml
<items>
<item>
<item-name>vlaue</item-name>
<item-number>vlaue</item-number>
<quantity>vlaue<quantity>
<option>
<on0>vlaue</on0>
...
I have a specific problem getting values for width and height out of some XML that has namespace prefixes defined. I can get other values such as SomeText from RelatedMaterial quite easily using normal xpath with namespace "n:" but unable to get values for width and height.
Sample XML:
<Description>
<Information>
<GroupInformation xml:...
Hello,
this is an example of my input file.
<root>
<!-- [...] -->
<bbb>Foo 1</bbb>
<aaa>xxxxxxxx</aaa>
<aaa>xxxxxxxx</aaa>
<aaa>xxxxxxxx</aaa>
<bbb>Foo 2</bbb>
<ccc>Foo 2.1</ccc>
<aaa>xxxxxxxx</aaa>
<aaa>xxxxxxxx</aaa>
<aaa>xxxxxxxx</aaa>
<bbb>Foo 3</bbb>
<ccc>Foo 3.1</ccc>
<aaa>xxxx...
i want to split the string based on some separator. for e.g
returns Topic1,Topic2,Tpoic3 as string.
i want to split the string based on ",", the way we have in C#.
Final output should be Topic1 Topic2 Topic3.
Regards,
Ketan
...
I know that if I have an XML file like this:
<persons>
<class name="English">
<person name="Tarzan" id="050676"/>
<person name="Donald" id="070754"/>
<person name="Dolly" id="231256"/>
</class>
<class name="Math">
<person name="Winston" id="050677"/>
<person name="Donald" id="070754"/>
...
I have the XML source file in SVG present like this:
<svg>
<g id='a001' class='pools'>
<g id='b001' class='pool' name='Proc111'>
<g id='c001' class='lane' name='User111' PoolID='b001'>
<g id='d001' class='startevent' name='startevent111' LaneID='c001'></g>
</g>
<g id='c002' class='lane' name='User22...
Hello, Could you help me to answer how to put collection of data as parameter in the xslt file, is it possible ? Thanks.
...
what // in xslt? e.g. ($currentPage//node)
...
<xsl:apply-templates select="element[child='Yes']">
Works fine but I would like to use
<xsl:apply-templates select="element[$childElementName='Yes']">
so I can use a variable to specify the node.
For example
<xsl:apply-templates select="theList/entity[Central='Yes']">
works fine against:
<?xml version="1.0" encoding="utf-8"?>
...
I have asp file with code below:
<html>
<head>
<link rel="stylesheet" href="<%=bb_style%>"/>
<title>asdf</title>
</head>
I need to include title from this file into another asp file formed by xslt transformation. I use this code:
<xsl:value-of select="document(content)/html/head/title"/>
But I have nothing ret...