I'm having trouble writing an XPath expression to select nodes that contain certain elements, while excluding siblings of this element that I'm not interested in. I suspect this can't be done with XPath alone and that I will need to use XSLT.
Using this source document
<items>
<item id="foo1">
<attr1>val1</attr1>
<attr...
XML:
<Budget>
<Table1>
<AllocID>1</AllocID>
<Amount>1000</Amount>
</Table1>
<Table1>
<AllocID>2</AllocID>
<Amount>2000</Amount>
</Table1>
<Table1>
<AllocID>3</AllocID>
<Amount>3000</Amount>
</Table1>
<Table2>
<AllocID>1</AllocID>
<Split>100</Spli...
I have tried every solution I found on here and even a larger Google search but nothing seems to work. Here is my problem... I have data that is in XML that I would like to visualize using the Google Visualization API. I was hoping I could simply use XSL to generate what I need instead of doing anything with data sources (I have my re...
The scope of XML and DOM in .NET 3.5 is so large that I'm having trouble coming up with a simple solution to my problem without using too many lines of messy code. Since people here always come up with some elegant solutions, I thought it would be a good question.
How do I take in an XML file (that I created and saved earlier in the pro...
I'm trying to use the EXSLT modules (specifically, math), in an XQuery document. How do I enable support for this in XMLSpy? Where would I place the downloaded EXSLT libraries to make XMLSpy aware of them?
...
How can I convert the following XML to an escaped text using XSLT?
Source:
<?xml version="1.0" encoding="utf-8"?>
<abc>
<def ghi="jkl">
mnop
</def>
</abc>
Output:
<TestElement><?xml version="1.0" encoding="utf-8"?><abc><def ghi="jkl">
mnop
</def></abc></TestElement>
Currently, I'm trying...
Hi,
We've an XML contains data. We need to extract data from it and move it in to a different XML. Both XMLs are different in structure.
We have Altova and we want to do this job by using it. Any solution on this; which Altova tool will be best for this job and how?
Thanks.
...
HI,
We are using NANT build scripts in our project. The scenario is as follows, In my Application I create an application( this is basically UI based, the user drags, drops widgets etc, these are stored as xml internally). then while I say Build application, we use NANT scripts to call XSLT transform, I do not know if it is possible to...
I've got an ejb-jar.xml that doesn't have an 'id' attribute in the tag.
What would be the best way to fix this? Could XSLT be used for this?
<session>
<ejb-name>EJB1</ejb-name>
<local-home>x.E1LH</local-home>
<local>x.E1L</local>
<ejb-class>x.E1EJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Contai...
Can you add an XML-stylesheet to the RSS feed generated through the new System.ServiceModel.Syndication namespace?
...
hey everyone my xml looks like this:
<someElement>
<DB>
<DBELEMENT>
</DBELEMENT>
<DBELEMENT>
</DBELEMENT>
</DB>
<GROUP>
<OBJECT>
<something type="name">
<value>some value
</value>
</something>
<something type="desc">
<value someattribue="AA">
<StyledElement>
...
The existing format is
<A>
<B>
<C>hello</C>
<C>how</C>
<C>are</C>
<C>you</C>
</B>
</A>
I want to transform it to something like this
<start>
<A>
<B>
<tag1> hello </tag1>
<tag2> hello </tag2>
</B>
</A>
<A>
<B>
<tag1> are </tag1>
<tag2> you </tag2>
</B>
</A>
</start>...
Hi. I have the following factorial function implemented in XSLT:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:apply-templates>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="facto...
Hello,
As I understand it, using XSL to generate documents has two parts:
1) An XML document which references an XSL stylesheet
2) An XSL stylesheet
Let's say that I want to generate a document using XSL, and then send it to a friend. Without relying on the stylesheet being available on the internet, and without including the styleshe...
We have xml documents that contain lots of flagged nodes like isProduct, isActive , isMandatory where the node text may be True or False.
It is needed to manipulate the documents and keep their structure but convert the above nodes into a verbal representation like below:
< isProduct >True</ isProduct > ===> <Type>Product<Type>
< ...
I use XSLT to transform an XML document which I then load on to a ASP.NET website. However, if the XML contains '<' characters, the XML becomes malformed.
<title><b> < left arrows <b></title>
If I use disable-output-escaping="yes", the XML cannot be loaded and I get the error "Name cannot begin with the '' character".
If I do not di...
I'm trying to go from this kind of input:
<col title="one">
<cell>a</cell> <cell>b</cell> <cell>c</cell> <cell>d</cell>
</col>
<col title="two">
<cell>e</cell> <cell>f</cell> <cell>g</cell>
</col>
... to this HTML output with XSLT:
<table>
<tr> <th>one</th> <th>two</th> </tr>
<tr> <td>a</td> <td>e</td> </tr>
<...
I'm looking to display a list of same-level node names, without duplicates.
Let's say I have
<a>
<b>
<c />
<d />
<d />
</b>
<b>
<e />
<c />
<f />
</b>
</a>
I'd want c,d,e,f to be displayed. I've found several solutions to a similar problem, eliminating duplicate siblings...
I try to transform a WSDL 1.1 to WSDL 2.0 using the XSLT 2.0 stylesheet from W3.org WSDL 1.1 to WSDL 2.0 convertor.
I'm working in .NET (C#) using the XslCompiledTransform.
Anyone has an idea why I get the "resolve-QName() is an unknown XSLT function" exception ?
Any workarounds ?
Thx
...
I have been reading on the different question talking about selecting unique nodes in a document (using the Muenchian method) but in my case I cannot use keys (or I do not know how) because I am working on a node set and not on the document.
And keys cannot be set on a node-set. Basically I have a variable:
<xsl:variable name="limitedS...