I have a HTML page (fully valid) that is post-processed by XSLT.
Let's say the relevant section of code looks like this:
<div id="content"> ... </div>
...
<div id="announcement"> ... </div>
The XSLT needs to transform it to look like this:
<div id="content"> <div id="announcement"> ... </div> ... </div>
Any ideas? I'm stuck.
Edit...
In this the catalog.xml file. I have two books who have the same inventory (i.e. 20). I want to write an XSL file that will display the highest number of copies of a book in a catalog. If there are two or more books of the same inventory then they have to be displayed.
<catalog>
<Book>
<sku>12345</sku>
<title>Beauty Secrets</t...
I have a document that looks something like
<root>
<element>
<subelement1 />
<subelement2 />
</element>
<element>
<subelement2 />
<subelement1 />
</element>
</root>
In my XSLT sheet in the context of /element[2]/[someNode] I want to get a number that represents the distance of /element[1...
Hi I want to work around a 'bug' in certain RSS-feeds, which use an incorrect namespace for the mediaRSS module. I tried to do it by manipulating the DOM programmatically, but using XSLT seems more flexible to me.
Example:
<media:thumbnail xmlns:media="http://search.yahoo.com/mrss" url="http://www.suedkurier.de/storage/pic/dpa/infoline...
I am attempting to create a list in XSL-FO using a square bracket. I have been able to get it working using the standard unicode bullet character (•) but I just can't seem to get it working for square brackets.
I have tried using ■, but that does not seem to work. It is important that i can get the square bullets working bec...
I am trying to load a xml document I created using PHP and DOM into a xslt sheet, but having no luck.
$xml_string = $doc->saveXML();
//echo $xml_string;
$xml = new DOMDocument;
$xml->load($xml_string);
$xsl = new DOMDocument;
$xsl->load('musicInformation.xslt');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importS...
I am writing an application which produces invoices. Yes, it sucks. I was wondering it there was any agreed upon DTD for invoices? It seems like everybody has their own format. Perhaps there is a collection of XSLTs for tranforming a common standard into lesser known formats?
...
I need to transform a valid XML document to the OFX v1.0.2 format. This format is more or less XML, but it's technically invalid and therefore cannot be parsed as XML.
I'm having trouble getting my Xml transformation working because the .Net XslCompiledTransform object insists on interpreting the output as an XML document (which is fai...
I'm trying to get title of simple html document to build sitemap. But always return empty value. I debug this and found out that document(content) returns document nodes. It looks like this. But I could not access document(content)/html or something like this. Please help!
...
how to check the tag exists and the value is 'On' do something in xsl
please correct me.,
<xsl:if test="$status and $status='On'">
//do something
</xsl:if>
can we skip checking whether the tag exists and direclty check for the value.
<xsl:if test="$status='On'">
//do something
</xsl:if>
is it a correct practice.,
...
I have the following xsl template:
<xsl:template match="para">
<fo:block xsl:use-attribute-sets="paragraph.para">
<!-- if first para in document -->
<!--<xsl:if test="//para[1] intersect .">-->
<xsl:if test="//para[1] intersect .">
<xsl:attribute name="space-after">10pt</xsl:attribute>
...
Hi,
Given this example XML file:
<doc>
<tag>
Hello !
</tag>
<tag>
My
name
is
John
</tag>
</doc>
And the following XSLT sheet:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="doc/tag">
<xsl:value-of select="."/>
</...
I have created a xslt document which formats an xml document, but I would like the results from the xslt sheet to be paginated.
here is the orginal xlst document
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UT...
With the following code:
private Document transformDoc(Source source) throws TransformerException, IOException {
TransformerFactory factory = TransformerFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
factory.setFeature("http://xml.org/sax/features/validatio...
In the following code:
private Document transformDoc(Source source) throws TransformerException, IOException {
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer =
factory.newTransformer(new StreamSource(xsltResource.getInputStream()));
JDOMResult result = new JDOMResult();
...
I'm looking for a library of XSLT to create SVG charts. I need pie charts, bar charts, line charts, all the usual suspects. I would hope for a reasonably simple DTD or Schema for the input files.
Edit: I have the raw data for the charts and a mechanism to convert it into what ever XML is necessary for the XSLT library.
...
I'm trying to transform one XML format to another using XSL. Try as I might, I can't seem to get a result.
I've hacked away at this for a while now and I've had no success. I'm not even getting any exceptions. I'm going to post the entire code and hopefully someone can help me work out what I've done wrong.
I'm aware there are likel...
Hello
I need to copy a node and its sub-nodes:
first: one identical copy
followed by a modified copy with some attributes values changed
Here is the extract to change:
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet=...
Hi! I'm using classic ASP in my project. I want to merge two XMLs together. How do I do this? Below is my sample code:
XML 1
<CATALOG>
<CD>
<TITLE>1</TITLE>
<ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia</COMPANY>
<PRICE>10.90</PRICE>
<YEAR>1985</YEAR>
</CD>
<CD>
<TITLE>2</TITLE>
<ARTIST>Bon...
This is my input xml:
<root>
<node1/>
<node2/>
<node3/>
<node4/>
<othertags/>
</root>
The output must be:
<root>
<othertags/>
</root>
if any of the 4 nodes isn't null then none of the tags must be dropped.
example:
<root>
<node1/>
<node2/>
<node3/>
<node4>sample_text</node4>
<othertags/>
</root>
...