I am having trouble with a template that has to check 3 different nodes and if they are not empty, print the data
I am using <xsl:if test="string-length(node) != 0"> for each node then doing the output but it is not printing anything. It is like the test returns zero.
I have selected the parent node of each node I want to check the le...
I have a rather complicated xslt sheet transforming one xml format to another using templates. However, in the resulting xml, I need to have all the empty elements excluded. How is that done?
This is how the base xslt looks like:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:far="http://www.itel...
I'd like to use embedded resources in my XSLT file, but while invoking 'document(...)' C# complains that "Error during loading document ..."
I'd like to use defined resources in XSLT file and get them by this: "document('')//my:resources/"...
How can i do that??
ex xsl:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version=...
I'm attempting to remove Component elements from the XML below that have File children with the extension "config." I've managed to do this part, but I also need to remove the matching ComponentRef elements that have the same "Id" values as these Components.
<Fragment>
<DirectoryRef Id="MyWebsite">
<Component Id="Comp1">
<Fi...
How can I include the content of a plain text file in a result document from within an XSLT 1.0 stylesheet? I.e., just like document(), but without parsing it:
<xsl:value-of select="magic-method-to-include-plaintext(@xlink_href)" />
I am almost sure, that this doesn't work without extension, because:
there is a special XPath functio...
I have about 10 xml schemas that I have to clean up by alphabetizing the elements/types. I googled for a while and found someone's solution,
Here
which doesn't work for me for whatever reason (it skips from xsd:schema straight to xsd:comlplexType name=Account).
Here is the simplist example, as you can see the first 10 or so elements a...
This question is quite similar to this one. Except that I want to preserve only <br /> and some <img> tags (with class="visible"). I.e from:
<example>
<text>
Some text with <br /> and <img src="source" /> then text .... <img class="visible" src="source" />
</text>
</example>
To have:
<div class="example">
<p>Some text...
Hello, i have a general "best practice" question regarding building a multi-level shop, which i hope doesn't get marked down/deleted as i personally think it's quite a good question, which some people might class as "subjective".
I am a developer in charge (in most part) of maintaining and evolving a cms system and associated front-end ...
Does jQuery support XSL transformations of XML? If so how do I use it?
I have bespoke code that does this, but would rather use jQuery if possible.
...
I want my NUnit output transformed into msbuild error format so I can report on these in the Visual Studio error list. I know TestDriven.Net does the same.
MSBuild error format samples:
Main.cs(17,20): warning CS0168: The variable 'foo' is declared but never used
C:\dir1\foo.resx(2) : error BC30188: Declaration expected.
cl : Command ...
I am using the below piece of XSL code to construct a span tag calling a javascript function on mouseover. The input to the javascipt should be a html table. The output from the variable "showContent" gives just the text content but not along with the table tags.
How can this be resolved.
XSL:
<xsl:variable name="aTable" as="...
I'm writing an XSL file that contains a side-nav menu with a list of links. When the user clicks on one of the links, the page jumps to the corresponding table of information for that link. How can I make it so that when the link is clicked, the title of that table (not the link itself) is highlighted? It should also un-highlight if anot...
I'm making a header in my XSL code that includes multiple fields of information, i.e. "Name: Bob Birthdate: January 1 1900," etc. I enclosed them in tags as such:
<xsl:text> Gender: Male </xsl:text>
But on the page, the whitespace around Gender/Male is being ignored. Is there something I'm missing?
Thanks in advance.
...
hi
i have complex xslt that formats xml to html
now i need to be able to create xsl fo out of it
what is the best way to do it ?
...
I currently have a <xsl:foreach> statement in my XSL processing all elements in this XML file. What I want to do though is process the first one separately to the rest. How can I achieve this?
Here is my current code:
<ul>
<xsl:for-each select="UpgradeProgress/Info">
<xsl:sort select="@Order" order="descending" data-type=...
I have the following XML:
<option>
<title>ABC</title>
<desc>123</desc>
</option>
<option>
<title>ABC</title>
<desc>12345</desc>
</option>
<option>
<title>ABC</title>
<desc>123</desc>
</option>
<option>
<title>EFG</title>
<desc>123</desc>
</option>
<option>
<title>EFG</title>
<desc>456</desc>
</opt...
Hello guys,
I'm using date:format-date template EXSLT file I'm using XSLT 1.0 and MSXML3.0 as the processor.
My date:format-date template EXSLT file's declaration is:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:date="http://exslt.org/dates-and...
I want to generate an XML file using Perl and XSLT. Is it possible to achieve this by updating the XSLT dynamically by uusing values from a hash?
Or is there any better solution for wirting a simple XML file using Perl?
...
I transform XML to (sort of) HTML with XSL stylesheets (using Apache Xalan). In XML there can be entities like —, which must be left as is. In beginning of XML file I have a doctype which references these entities. What should I do for entity to be left unchanged?
<!DOCTYPE article [
<!ENTITY mdash "—"><!-- em dash -->
]>
...
I've seen lots of "de-duplicate this xml" questions but everyone wants the first node or the nodes are identical. I have a bit of a bigger puzzle.
I have a list of articles in XML, a relevant snippet is shown:
<item><key>Article1</key><stamp>100</stamp></item>
<item><key>Article1</key><stamp>130</stamp></item>
<item><key>Article2</key...