XSL stylesheet should output following code to Internet Explorer:
<xml:namespace prefix="vml" ns="urn:schemas-microsoft-com:vml"/>
But when I execute following template with any XML
<xsl:template match="*|node()">
<xml:namespace prefix="vml"
ns="urn:schemas-microsoft-com:vml"/>
</xsl:template>
IE throws parsi...
How can I use EXSLT extensions to subtract a date.
I see that there is a date-add function, but the EXSLT docs don't include any examples. I am trying to take the current date and subtract 1 month for example.
...
If I am testing several different defined parameters can I call multiple xsl:when statements within on xsl:choose statement? So if I have:
<parameters>
<param id="1">
<key>Load</key>
<value>XML</value>
</param>
<param id="2">
...
I am stumped. Given an xml doc like:
<Frag>
<DirRef Id="BeemzDir">
<Com Id="BEED24F05AB78FB588F61D4092654B6D" Guid="{A11AB356-2F45-4157-92EF-ED49F5BE0F70}">
<FileName Id="fil1" KeyPath="yes" Source="My.Exe" />
</Com>
<Com Id="FFF24F05AB78FB588F61D4092654CCC" Guid="{A11AB356...
I have a document like this:
<?xml-stylesheet type="text/css" href="http://ltw1001.web.cs.unibo.it/svg.css" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg= "http://www.w3.org/2000/svg">
<body>
<sv...
My system produces a XML that contain a node that, depending on the type of event, came with different name.
The name can be <floatRate> or <fixedRate>. The path is always the same, only the node name that is different.
I need a transformation that can populate one field based on that name. The field will be called <type> and the conten...
Hi,
I have an xml resultset which has to be converted using XSL for display into an excel spreadsheet in a vb.net application. The xml resultset has 15 columns (15 properties of client like firstname,lastname,address etc) and I don't want to hardcode the select attribute of xsl/xpath with property or xml element names. I need an XSL tha...
Hi,
I have the following xml:
<?xml version="1.0" encoding="UTF-8"?>
<SomeName>
<NodeA>
DataA
</NodeA>
<NodeA>
DataB
</NodeA>
<NodeA>
DataA
</NodeA>
<AnotherNode>
DataA
</AnotherNode>
<AnotherNode>
DataC
</AnotherNode>
<AnotherNode>
DataC
</AnotherNode>
<SingleNode>...
I've got a requirement to take some XML and transform it into a fixed-width load file for loading to an SAP system. My algorithm works fine except for some weird European characters such as Ã, which, when in a string returns a string length of +1 for each instance of the char. So for example the text Ãbcd would have a string-length($va...
I am writing an XSLT for turning an XML file into a human-readable HTML page.
The XML has several fields to describe some aspects of the data, which contain integers which represent mapped strings. The integers are not the information the user wants, I need to map those integers to the corresponding strings.
The mapped strings are avai...
Hi
I'm having trouble with an XSLT to loop through all the rows, and then all the columns in each row element.
So if this is the XML I have:
<root>
<subelement>
<rows>
<row title="Row1">
<column title="A" />
<column title="B" />
</row>
<row title="Row2">
<column title="C" />
<column title="D" />
</row>
</rows>
</subelement>
</...
Sometimes XML files needs to be stored in some VCS. Such files are often edited using GUI tools which can reorder the elements each times as they want.
Also VCS merging is usually line-oriented, and often XML files either looks likes one long line or fully indented like
<foo>
<bar>
<name>
n3
</name>
...
Can you nest xsl:if within nested xsl:when, for example:
<xsl:choose>
<xsl:when test="param/@id = '1' " >
<xsl:if test="param/value = 'XML' ">
<xsl:when test="param/@id = '2' ">
<xsl:if test="param/value = 'HTTP' ">
<xsl:when test="param/@id = '3' ">
...
What XSLT is required to replace the text of a node with the same text enclosed in double quotes:
<users>
<user_info>
<lastname>Jenkins</lastname>
<firstname>Bob</firstname>
</user_info>
<user_info>
<lastname>Smith</lastname>
<firstname>Mike</firstname>
</user_info>
</users>
This is a simplified view, my user_i...
Using this input XML:
<?xml version="1.0" encoding="utf-8"?>
<Employees>
<Employee ID="1">
<FirstName>Klaus</FirstName>
<LastName>Salchner</LastName>
</Employee>
<Employee ID="2">
<FirstName>Peter</FirstName>
<LastName>Pan</LastName>
</Employee>
</Employees>
How would you get this output:
<Employee...
The xml file is having the following structure
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="TestFile.xsl"?>
<RootElement>
<Date FileModified="7/2/2010 12:54:53 PM" />
<Child Name="A"/>
<Child Name="B"/>
<Child Name="C"/>
<Child Name="D"/>
<Child Name="E"/>
</RootElement>
I need to rea...
<xsl:choose>
<xsl:when test="long convoluted expression">
<xsl:element name="Class">123</xsl:element>
<a lot more xsl:elements>
</xsl:when>
<xsl:when test="next very long expression">
<xml:element name="Class">124</xsl:element>
<a lot more xsl:elements>
</xsl:when>
<tens of more similar...
I have an XML document that models this hierarchy of tasks:
1 Customer
1.1 Product A
1.1.1 Task Alpha
1.1.2 Task Beta
1.2 Product B
1.2.1 Task Alpha
1.2.2 Task Gamma
2 Customer
2.1 Product W
2.1.1 Task Delta
Unknown number of Customers, Products, and Tasks per product. There can also be an unknown number of subtasks, ...
Is it possible to associate a stylesheet with with Nokogiri, to create this structure?
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.my-site.com/sitemap.xsl"?>
<root>
...
</root>
...
Hi,
I need to define a xsl:param with a string that contains & character for further processing.
For example:
<xsl:param name="greeting" as="xs:string">Hi & Bye</xsl:param>
Important Notice:
I am using a xslt converter component in a webservice tool. What I do, is that I just initialize the param and as the webservice is called the...