When I call an extension c# function like this:
<xsl:choose>
<xsl:when test="extension:matches('\d', .)">
<td bgcolor="#ff00ff">
<xsl:value-of select="blah"/></td>
</xsl:when>
<xsl:otherwise>
<td><xsl:value-of select="blub"/></td>
</xsl:otherwise>
</xsl:choose>
Then the functions receives as first argument "\\d".
...
How would I cleanly set the doctype of a file to HTML5 <!DOCTYPE html> via XSLT (in this case with collective.xdv)
The following, which is the best my Google foo has been able to find:
<xsl:output
method="html"
doctype-public="XSLT-compat"
omit-xml-declaration="yes"
encoding="UTF-8"
indent="yes" />
produces:
<!DO...
Hi,
I am trying to use XSL to convert a news feed into a fragment of html for insertion into a web page.
The news feed is several hundred items long and so I only want to include the latest 10 headlines... The xsl is below, I was thinking I could have a counter and break out of the loop after the desired number of iterations. However ...
how to find greatest 2 numbers out of 3 numbers. like in following example.
<root>
<num>10</num>
<num>12</num>
<num>8</num>
</root>
for the above code xslt should display "10 12"
help me to do it.
Thanks in advance!!!
...
Pretty newbie with all this XSL: FO mallarky and I am having a hard time creating quite a complex table in a document. I have a 4 column part to the table, and I have a statement that I would like to sit in the footer of the table spaning 4 columns, but after creating a fo table-footer section, I cannot get my footer to display. I don't ...
how to find greatest 2 numbers out of 3 numbers and perform some arithmetic operations. like in following example.
Example
<root>
<num>10</num>
<num>12</num>
<num>8</num>
</root>
for the above code xslt should display "10 + 12 = 22" and "average = 11"
help me to do it.
Thanks in advance!!!
...
I have the following XSLT code that almost does what I want:
<xsl:variable name="scoredItems"
select=
".//item/attributes/scored[@value='true'] |
self::section[attributes/variable_name/@value='SCORE']/item |
.//item//variables//variable_name"/>
I want to change this t...
I need to add a namespace, and to add an attribute to certain nodes. With this input:
<root>
<Node1>test</Node1>
<DateTo />
</root>
I want this output:
<my:root xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-07-28T07:33:11">
<my:Node1>test</my:Node1>
<my:DateTo xsi:nil="true"/>
</my:root>
The Dat...
Hello,
I'm trying to do a easy dynamic with an input XML. My XML code looks like:
<table>
<col size="5%">#</col>
<col size="55%">Title</col>
<col size="10%">Author</col>
<col size="10%">Date</col>
<col size="10%">Modification</col>
<col size="10%">Actions</col>
<output>
...
Hey,
I was just wondering if anyone could explain to me how a price comparison website works? I mean if it works how I think it does (explained below) then I have a really good project to work on for myself, which should make a lot of money long term.
So how I think it works is that each supplier provides an RSS feed which the comparis...
hallo all i am trying to put a custom server control
this time it happens to be an fckeditor control
inside my xslt file.
i use this file for custom generated forms
anyway i have no problem putting asp server controls inside the xslt but..
i get an error when i try to put a control with a diffrent namespace
here is the code:
<xsl:if ...
I have the following nodes in xsl:
<foo>
<bar>1</bar>
<bar>2</bar>
<bar>3</bar>
<bar>4</bar>
<bar>5</bar>
<bar>6</bar>
<bar>7</bar>
<bar>8</bar>
<bar>9</bar>
</foo>
And would like to turn it into the following html:
<ul class="one">
<li>1</li>
<li>4</li>
...
Hi!
I have code that I expect to return the element name, but nothing is returned.
The following code is from an XSL doc that generates another XSL doc.. where $expression is a variable that dynamically created an XPath expression.
<xsl:template match="/">
...
<xslt:template match="{$expression}">
<elem key="{name()}">...
I'm having an issue doing conditional tests and sorts using params passed into the xsl file from PHP. I can do a match based on testing a string value, and can sort using an explicit name, but cannot get the variables to work in doing either. Here is the XSL and a fragment of the relevant XML.
<Products xmlns:b="http://www.viator.com/af...
I’m processing an XML file that, simplified, looks something like this:
<resources>
<resource id="a">
<dependency idref="b"/>
<!-- some other stuff -->
</resource>
<resource id="b">
<!-- some other stuff -->
</resource>
</resources>
The XSLT stylesheet must process a particular resource that we’re interested in, wh...
I am using some code to subtract one date from another using XSLT 2.0:
<xsl:template match="moveInDate">
<xsl:value-of select="current-date() - xs:date(.)"/>
</xsl:template>
This works, however it leaves me with an answer of P2243D, which I assume corresponds to a "Period of 2243 Days" (which is correct in terms of the math).
Sin...
I have a big chunk of deeply-nested semi-structured JSON and would like to generate HTML from it. At the moment I'm using jQote2, but much of the code inside my templates deals with dynamically finding the next template to render and then calling it. What's a single <xsl:apply-tenplates> in XSLT takes several lines with JavaScript and jQ...
How can I find all the distinct names in my XML by using XSL?
<NewDataSet>
<SearchResult>
<Name>HAREDIN </Name>
<Surname>FEIMI</Surname>
<FathersName>QAMIL</FathersName>
<Birthdate>1949-06-13T00:00:00+02:00</Birthdate>
<CustomerSegment>Individe Standart </CustomerSegment>
</SearchResult>
<SearchResult>
<Nam...
I created an XSLT stylesheet which looks for a node and deletes it. This works great. I now want to check to see if a certain node exist and then delete that node if it is there.
So I attempted to add an if-statement and that's were I ran into the following error:
compilation error: file dt.xls line
10 element template
element t...
I need to change the order in which my for-each is executed only if some conditions are met.
Here is what my XML looks like :
<OptionList>
<Option name="My First Option" />
<Option name="My Second Option" />
</OptionList>
However, in some case, my XML can be like this :
<OptionList>
<Option />
<Option name="My Second...