Say I have the following XML...
<root>
<base>
<tent key="1" color="red"/>
<tent key="2" color="yellow"/>
<tent key="3" color="blue"/>
</base>
<bucket>
<tent key="1"/>
<tent key="3"/>
</bucket>
</root>
...what would the XPath be that returns that the "bucket" contains "red" and "blue"?
...
I am trying to use VBSctipt to do an xslt transform on an xml object.
The xsl file I'm translating includes the <xsl:import href="script.xsl"/> directive. If I use the absolute href (http://localhost/mysite/script.xsl) it imports the style sheet fine; however, if I use the relative path (script.xsl) it reports "resource not found". I ne...
I've had a hard time finding good ways of taking a time format and easily determining if it's valid then producing a resulting element that has some formatting using XSLT 1.0.
Given the following xml:
<root>
<srcTime>2300</srcTime>
</root>
It would be great to produce the resulting xml:
<root>
<dstTime>23:00</dstTime>
</root...
I have an XML document with un-namespaced elements, and I want to use XSLT to add namespaces to them. Most elements will be in namespace A; a few will be in namespace B. How do I do this?
...
This XML file contained archived news stories for all of last year. I was asked to sort these stories by story categor[y|ies] into new XML files.
big_story_export.xml
turns into
lifestyles.xml
food.xml
nascar.xml
...and so on.
I got the job done using a one-off python script, however, I originally attempted this using XSLT. This r...
I want something like this:
<msxsl:script language="C#">
??? getNodes() { ... return ... }
</msxsl:script>
<xsl:for-each select="user:getNodes()">
...
</xsl:for-each>
What return type should i use for getNodes() and what should i put in it's body?
...
How to count distinct values in a node in XSLT?
Example: I want to count the number of existing countries in Country nodes, in this case, it would be 3.
<Artists_by_Countries>
<Artist_by_Country>
<Location_ID>62</Location_ID>
<Artist_ID>212</Artist_ID>
<Country>Argentina</Country>
</Artist_by_Country>
<Artist...
I would like to know what of the many XSLT engines out there works well with Perl.
I will use Apache (2.0) and Perl, and I want to obtain PDFs and XHTMLs.
I'm new to this kind of projects so any comment or suggestion will be welcome.
Thanks.
Doing a simple search on Google I found a lot and I suppose that there are to many more.
...
I've got a XmlNodeList which I need to have it in a format that I can then re-use it within a XSLT stylesheet by calling it from a C# extension method, can anyone help? I have read that it might have something to do with using a XPathNavigator but I'm still a bit stuck.
Thanks in advanced,
Chris
...
I've got some XML, for example purposes it looks like this:
<root>
<field1>test</field1>
<f2>t2</f2>
<f2>t3</f2>
</root>
I want to transform it with XSLT, but I want to suppress the second f2 element in the output - how do I check inside my template to see if the f2 element already exists in the output when the second f2 e...
I've got an XML document containing news stories, and the body element of a news story contains p tags amongst the plain text. When I use XSL to retrieve the body, e.g.
<xsl:value-of select="body" />
the p tags seem to get stripped out. I'm using Visual Studio 2005's implementation of XSL.
Does anyone have any ideas how to avoid this...
I'm exploring the XML -> XSLT -> HTML meme for producing web content. I have very little XSLT experience.
I'm curious what mechanisms are available in XSLT to handle abstractions or "refactoring".
For example, with generic HTML and a service side include, many pages can be templated and decomposed to where there are, say, common header...
Is there some simple way to calculate a Weeknumber value from a date value stored in XML?
It needs to be pure XSLT solution. I cannot use any code :(
...
Does anyone have an XSLT that will take the app.config and render it into a non-techie palatable format?
The purpose being mainly informational, but with the nice side-effect of validating the XML (if it's been made invalid, it won't render)
...
I have parsed Xml using both of the following two methods...
Parsing the XmlDocument using the object model and XPath queries.
XSL/T
But I have never used...
The Linq Xml object model that was new to .Net 3.5
Can anyone tell me the comparative effeciantly between the three alternatives?
I realise that the particular usage would ...
I'm trying to convert an XML file into the markup used by dokuwiki, using XSLT. This actually works to some degree, but the indentation in the XSL file is getting inserted into the results. At the moment, I have two choices: abandon this XSLT thing entirely, and find another way to convert from XML to dokuwiki markup, or delete about 9...
I have an XSL stylesheet with content in an xsl:text node like this:
<xsl:text>
foo
bar
baz
</xsl:text>
The stylesheet itself is a text file with "unix-style" newline line terminators. I invoke this stylesheet on Windows as well as unix-like platforms. It would be nice to have the output conform to the conventions of the platform on w...
I have XML that looks like
<answers>
<answer>
<question-number>1</question-number>
<value>3</value>
<mean xsi:nil="1" />
</answer>
<answer>
<question-number>2</question-number>
<value>2</value>
<mean>2.3</mean>
</answer>
<answer>
<question-number>3</question-number>
<value...
Hi, I am looking to use Cocoon for a couple of sites I am creating. I will make heavy use of xml, xsl and conversion to html, pdf and excel on the sites. I am attracted to coccon as it implements these functions quite well.
I guess I am just wondering if anyone has used it and like it, or if they found it was more trouble than it's wo...
I have an ASPX page that creates an XMLDocument object from SQL data and then transforms it into another XML document (RSS feed) using an XSLT file with XPathNavigator and XslCompiledTransform. Occasionally the data will contain smart quotes (\u2019) which results in an error (Unable to translate Unicode character \u2019 at index 947 to...