I'm having a problem with XSL variables.
I know that once declared, the value of the variable cant be changed.
But I'm facing a rather strange problem and I cant possibly change the XML output, instead figure out if its possible with XSL itself.
I'm using xsl:for-each to loop over some data in the XML.
The data being looped can be of ...
<ClinicalDocument>
<entry>
<substaceAdministration>
<effectiveTime></effectiveTime>
</substaceAdministration>
</entry>
<entry>
<substaceAdministration>
<effectiveTime></effectiveTime>
</substaceAdministration>
</entry>
<entry>
<substaceAdministration>
</substaceAdministration>
</e...
Hi,
I am trying to generate a PDF using XSL(XML-FO) to transform a generated XML from a database.
Because of complex rules in terms of paging for this document, calculations are done in determining the page breaks when I generate the XML that will be consumed by the XSL. I have noticed that I've been getting inconsistent results with ...
Hey everyone im trying to use
<xsl:for-each select="//node1">
in my xsl the problem is that it gets all the nodes name node1 together and not passing them one by one (as for each should be)
just for you to know im using // pattern becuase my xml changes and i do need to find inside some node the node1
hope you can help...
...
hey everyone
my xml has some node with same attribute and i would like to pull them using some xpath hope you can help
so it basically looks like this
<myxml>
<something Type="AT_SAS_6"/>
<something Type="AT_SAS_50"/>
<something Type="AT_SAS_200"/>
</myxml>
i know that if it was on the name i could do something like
<xsl:template ...
Hi there
I have got some XML which is built by my application. This XML is dropped to an XML file, which I then wish to apply an XSL stylesheet to in order to convert it to a HTML page. However, every time, it just keeps coming out with the original XML rather than the transformed HTML
Here is the XML:
<firelist>
<visitor>
<Titl...
I am looking for suggestions to validate an XML element which holds the date and i need a function in the XSLT to validate whether it is in YYYYMMDD format or not.
...
I attempted this to count the total characters of my title attribute value, but it didn't seem to evaluate as I intended it to:
<xsl:if test="count(@title)>10">
<xsl:attribute name="class">double-line</xsl:attribute>
</xsl:if>
I also tried to append /text() to @title. It looks like I'm still off. Any suggestions?
...
I want to translate an XML file with data like the following:
<FlatData>
<Details1_Collection>
<Details1 Customer1="Customer" Total1="3" />
...
</Details1_Collection>
</FlatData>
The data I am interested in is the attributes and their values in each Details1. The problem is that these attributes are not necess...
Okay, I did a crappy job of describing the issue in my previous post. I think the discussion got sidetracked from the core issue - so I'm going to try again. Mea Culpa to Elzo Valugi about the aforementioned thread.
I have an XML file:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="wtf.xsl"?>
<Paragraphs...
Hello there,
I have my nice set of XML files for a user manual, which I already transform to HTML to make the online manual (simil CHM) with XSLT.
Now, I'd like to make a printable user manual from the same set of XML files. I'd like to generate an ODT or directly a PDF file, but I didn't find any "quick-and-simple" tool to do that.
T...
Let's say I have the following XML structure:
<entry>
<countries>USA, Australia, Canada</countries>
</entry>
<entry>
<countries>USA, Australia</countries>
</entry>
<entry>
<countries>Australia, Belgium</countries>
</entry>
<entry>
<countries>Croatia</countries>
</entry>
I would like to count number of instances for each coun...
I have a bunch of nodesets where I want to return "1" instead of "true" when there are more than one hit on count($mynodeset)
Is there more compact/smarter way to to do this in XSLT 1.1?
<xsl:variable name="x5" select="count($mynodeset) != 0"/>
<xsl:variable name="z5">
<xsl:choose>
<xsl:when test="x5 = 'true'">1</xsl:w...
I am trying to create an embedded file containing both XML and XSL. The test is based on "XML and XSL in one file" on dpawson.co.uk. The source looks like this:
<?xml-stylesheet type="text/xml" href="#stylesheet"?>
<!DOCTYPE doc [
<!ATTLIST xsl:stylesheet
id ID #REQUIRED>
]>
<doc>
<xsl:stylesheet id="stylesheet"
ver...
For-each of a collection of headers and find a certain attribute in another collection of Items. If I have something like:
<ROOT>
<Listings>
<Listing>
<Headers>
<Header width="3cm" value="UserName" />
<Header width="3cm" value="MobileAlias" />
<Header width="3cm" value="Name" />
<Header wid...
Pretty simple question, how can I transform a number (1, 2, 3, etc) into a print friendly ordinal number (1st, 2nd, 3rd, etc) using xslt?
Currently the following works for 1-20 but we may be seeing larger sets of entities getting ranked soon:
<xsl:template name="FormatRanking">
<xsl:param name="Value"></xsl:param>
<xsl:choose>
<xs...
Hi,
using an in Document DTD I did the following:
file.xsl:
<!DOCTYPE xsl:stylesheet[
<!ENTITY red "rgb(255,0,0)">
]>
<xsl:stylesheet>
[...]
<xsl:attribute name="color">&red;</xsl:attribute>
[...]
</xsl:stylesheet>
I wanted to change everything to XML-Schema. So I tried:
file.xsd:
<xsd:schema xmlns:xsd="http://www.w3.o...
Hi
I have an xml file with an xsl that I am trying to change the way the numbers are displayed. In the xml all the numbers are in the format 00:12:34
I need to remove the first 2 zeros and the colon and just display 12:34
I am not sure if I use a substring or a decimal format. I am pretty new to this so any help would be marvellous....
I am using an XSLT stylesheet to create an Excel document from an XML file. One of the values that I am pulling in I want to display as upper case. How is this possible?
...
Hello,
I need to make an statement where the test pass if there is just one asterisk in a string from the source document.
Thus, something like
<xslt:if test="count(find('\*', @myAttribute)) = 1)>
There is one asterisk in myAttribute
</xslt:if>
I need the functionality for XSLT 1, but answers for XSLT 2 will be appreciated as w...