Merge branch 'master' into master
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
*.class
|
||||
|
||||
#folders#
|
||||
/target
|
||||
/neoDb*
|
||||
/data
|
||||
/src/main/webapp/WEB-INF/classes
|
||||
*/META-INF/*
|
||||
|
||||
# Packaged files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# Files generated by integration tests
|
||||
*.txt
|
||||
@@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>apache-fop</artifactId>
|
||||
<version>0.1-SNAPSHOT</version>
|
||||
<name>apache-fop</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<!-- new dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.xmlgraphics</groupId>
|
||||
<artifactId>fop</artifactId>
|
||||
<version>${fop.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.avalon.framework</groupId>
|
||||
<artifactId>avalon-framework-api</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.avalon.framework</groupId>
|
||||
<artifactId>avalon-framework-impl</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>avalon-framework</groupId>
|
||||
<artifactId>avalon-framework-api</artifactId>
|
||||
<version>${avalon-framework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>avalon-framework</groupId>
|
||||
<artifactId>avalon-framework-impl</artifactId>
|
||||
<version>${avalon-framework.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dbdoclet</groupId>
|
||||
<artifactId>dbdoclet</artifactId>
|
||||
<version>${dbdoclet.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dbdoclet</groupId>
|
||||
<artifactId>herold</artifactId>
|
||||
<version>${org.dbdoclet.herold.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.jtidy</groupId>
|
||||
<artifactId>jtidy</artifactId>
|
||||
<version>${jtidy.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>apache-fop</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<fop.version>1.1</fop.version>
|
||||
<avalon-framework.version>4.3</avalon-framework.version>
|
||||
<dbdoclet.version>8.0.2</dbdoclet.version>
|
||||
<jtidy.version>r938</jtidy.version>
|
||||
<org.dbdoclet.herold.version>8.0.4</org.dbdoclet.herold.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.springframework" level="WARN" />
|
||||
<logger name="org.springframework.transaction" level="WARN" />
|
||||
|
||||
<!-- in order to debug some marshalling issues, this needs to be TRACE -->
|
||||
<logger name="org.springframework.web.servlet.mvc" level="WARN" />
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd" >
|
||||
|
||||
</beans>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
xsi:schemaLocation="
|
||||
http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"
|
||||
>
|
||||
|
||||
<display-name>Spring MVC Application</display-name>
|
||||
|
||||
<!-- Spring root -->
|
||||
<context-param>
|
||||
<param-name>contextClass</param-name>
|
||||
<param-value>
|
||||
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
|
||||
</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>com.baeldung.config</param-value>
|
||||
</context-param>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- Spring child -->
|
||||
<servlet>
|
||||
<servlet-name>api</servlet-name>
|
||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>api</servlet-name>
|
||||
<url-pattern>/</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<welcome-file-list>
|
||||
<welcome-file/>
|
||||
</welcome-file-list>
|
||||
|
||||
</web-app>
|
||||
@@ -1,122 +0,0 @@
|
||||
package com.baeldung.java;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMResult;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.sax.SAXResult;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import org.apache.fop.apps.Fop;
|
||||
import org.apache.fop.apps.FopFactory;
|
||||
import org.apache.xmlgraphics.util.MimeConstants;
|
||||
import org.dbdoclet.trafo.html.docbook.HtmlDocBookTrafo;
|
||||
import org.dbdoclet.trafo.script.Script;
|
||||
import org.junit.Test;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.tidy.Tidy;
|
||||
|
||||
public class ApacheFOPConvertHTMLIntegrationTest {
|
||||
private final String inputFile = "src/test/resources/input.html";
|
||||
private final String style = "src/test/resources/xhtml2fo.xsl";
|
||||
private final String style1 = "src/test/resources/docbook-xsl/fo/docbook.xsl";
|
||||
private final String output_jtidy = "src/test/resources/output_jtidy.pdf";
|
||||
private final String output_html2fo = "src/test/resources/output_html2fo.pdf";
|
||||
private final String output_herold = "src/test/resources/output_herold.pdf";
|
||||
private final String foFile = "src/test/resources/input.fo";
|
||||
private final String xmlFile = "src/test/resources/input.xml";
|
||||
|
||||
@Test
|
||||
public void whenTransformHTMLToPDFUsingJTidy_thenCorrect() throws Exception {
|
||||
final Document xhtml = fromHTMLToXHTML();
|
||||
final Document fo = fromXHTMLToFO(xhtml);
|
||||
fromFODocumentToPDF(fo, output_jtidy);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenTransformFromHTML2FOToPDF_thenCorrect() throws Exception {
|
||||
fromFOFileToPDF();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenTransformFromHeroldToPDF_thenCorrect() throws Exception {
|
||||
fromHTMLTOXMLUsingHerold();
|
||||
final Document fo = fromXMLFileToFO();
|
||||
fromFODocumentToPDF(fo, output_herold);
|
||||
}
|
||||
|
||||
private Document fromHTMLToXHTML() throws FileNotFoundException {
|
||||
final FileInputStream reader = new FileInputStream(inputFile);
|
||||
final Tidy tidy = new Tidy();
|
||||
final Document xml = tidy.parseDOM(reader, null);
|
||||
return xml;
|
||||
}
|
||||
|
||||
private Document fromXHTMLToFO(final Document xhtml) throws Exception {
|
||||
final DOMSource source = new DOMSource(xhtml);
|
||||
final DOMResult result = new DOMResult();
|
||||
final Transformer transformer = createTransformer(style);
|
||||
transformer.transform(source, result);
|
||||
return (Document) result.getNode();
|
||||
}
|
||||
|
||||
private void fromFODocumentToPDF(final Document fo, final String outputFile) throws Exception {
|
||||
final FopFactory fopFactory = FopFactory.newInstance();
|
||||
final OutputStream outStream = new BufferedOutputStream(new FileOutputStream(new File(outputFile)));
|
||||
|
||||
final Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, outStream);
|
||||
final TransformerFactory factory = TransformerFactory.newInstance();
|
||||
final Transformer transformer = factory.newTransformer();
|
||||
final DOMSource src = new DOMSource(fo);
|
||||
final Result res = new SAXResult(fop.getDefaultHandler());
|
||||
transformer.transform(src, res);
|
||||
|
||||
outStream.close();
|
||||
}
|
||||
|
||||
private Transformer createTransformer(final String styleFile) throws Exception {
|
||||
final TransformerFactory factory = TransformerFactory.newInstance();
|
||||
final Transformer transformer = factory.newTransformer(new StreamSource(styleFile));
|
||||
|
||||
return transformer;
|
||||
}
|
||||
|
||||
private void fromFOFileToPDF() throws Exception {
|
||||
final FopFactory fopFactory = FopFactory.newInstance();
|
||||
final OutputStream outStream = new BufferedOutputStream(new FileOutputStream(new File(output_html2fo)));
|
||||
final Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, outStream);
|
||||
|
||||
final TransformerFactory factory = TransformerFactory.newInstance();
|
||||
final Transformer transformer = factory.newTransformer();
|
||||
final Source src = new StreamSource(new FileInputStream(foFile));
|
||||
final Result res = new SAXResult(fop.getDefaultHandler());
|
||||
transformer.transform(src, res);
|
||||
|
||||
outStream.close();
|
||||
}
|
||||
|
||||
private Document fromXMLFileToFO() throws Exception {
|
||||
final Source source = new StreamSource(new FileInputStream(xmlFile));
|
||||
final DOMResult result = new DOMResult();
|
||||
final Transformer transformer = createTransformer(style1);
|
||||
transformer.transform(source, result);
|
||||
return (Document) result.getNode();
|
||||
}
|
||||
|
||||
private void fromHTMLTOXMLUsingHerold() throws Exception {
|
||||
final Script script = new Script();
|
||||
final HtmlDocBookTrafo transformer = new HtmlDocBookTrafo();
|
||||
transformer.setInputStream(new FileInputStream(inputFile));
|
||||
transformer.setOutputStream(new FileOutputStream(xmlFile));
|
||||
transformer.transform(script);
|
||||
}
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
package com.baeldung.java;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
import javax.xml.transform.Result;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.Transformer;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.transform.dom.DOMResult;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.sax.SAXResult;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import org.apache.fop.apps.Fop;
|
||||
import org.apache.fop.apps.FopFactory;
|
||||
import org.apache.xmlgraphics.util.MimeConstants;
|
||||
import org.dbdoclet.trafo.TrafoScriptManager;
|
||||
import org.dbdoclet.trafo.html.docbook.HtmlDocBookTrafo;
|
||||
import org.dbdoclet.trafo.script.Script;
|
||||
import org.junit.Test;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
public class ApacheFOPHeroldLiveTest {
|
||||
private final String[] inputUrls = {// @formatter:off
|
||||
// "http://www.baeldung.com/spring-security-basic-authentication",
|
||||
"http://www.baeldung.com/spring-security-digest-authentication"
|
||||
//"http://www.baeldung.com/spring-httpmessageconverter-rest",
|
||||
//"http://www.baeldung.com/2011/11/06/restful-web-service-discoverability-part-4/",
|
||||
//"http://www.baeldung.com/2011/11/13/rest-service-discoverability-with-spring-part-5/",
|
||||
//"http://www.baeldung.com/2013/01/11/etags-for-rest-with-spring/",
|
||||
// "http://www.baeldung.com/2012/01/18/rest-pagination-in-spring/",
|
||||
//"http://inprogress.baeldung.com/?p=1430",
|
||||
//"http://www.baeldung.com/2013/01/31/exception-handling-for-rest-with-spring-3-2/",
|
||||
//"http://www.baeldung.com/rest-versioning",
|
||||
//"http://www.baeldung.com/2013/01/18/testing-rest-with-multiple-mime-types/"
|
||||
}; // @formatter:on
|
||||
|
||||
private final String style_file = "src/test/resources/docbook-xsl/fo/docbook.xsl";
|
||||
private final String output_file = "src/test/resources/final_output.pdf";
|
||||
private final String xmlInput = "src/test/resources/input.xml";
|
||||
private final String xmlOutput = "src/test/resources/output.xml";
|
||||
|
||||
// tests
|
||||
|
||||
@Test
|
||||
public void whenTransformFromHeroldToPDF_thenCorrect() throws Exception {
|
||||
final int len = inputUrls.length;
|
||||
fromHTMLTOXMLUsingHerold(inputUrls[0], false);
|
||||
for (int i = 1; i < len; i++) {
|
||||
fromHTMLTOXMLUsingHerold(inputUrls[i], true);
|
||||
}
|
||||
fixXML(xmlInput, xmlOutput);
|
||||
final Document fo = fromXMLFileToFO();
|
||||
fromFODocumentToPDF(fo, output_file);
|
||||
}
|
||||
|
||||
// UTIL
|
||||
|
||||
private void fromHTMLTOXMLUsingHerold(final String input, final boolean append) throws Exception {
|
||||
Script script;
|
||||
final TrafoScriptManager mgr = new TrafoScriptManager();
|
||||
final File profileFile = new File("src/test/resources/default.her");
|
||||
script = mgr.parseScript(profileFile);
|
||||
final HtmlDocBookTrafo transformer = new HtmlDocBookTrafo();
|
||||
transformer.setInputStream(getInputStream(input));
|
||||
transformer.setOutputStream(new FileOutputStream(xmlInput, append));
|
||||
|
||||
transformer.transform(script);
|
||||
}
|
||||
|
||||
private Document fromXMLFileToFO() throws Exception {
|
||||
final Source source = new StreamSource(new FileInputStream(xmlOutput));
|
||||
final DOMResult result = new DOMResult();
|
||||
final Transformer transformer = createTransformer(style_file);
|
||||
transformer.transform(source, result);
|
||||
return (Document) result.getNode();
|
||||
}
|
||||
|
||||
private void fromFODocumentToPDF(final Document fo, final String outputFile) throws Exception {
|
||||
final FopFactory fopFactory = FopFactory.newInstance();
|
||||
final OutputStream outStream = new BufferedOutputStream(new FileOutputStream(new File(outputFile)));
|
||||
|
||||
final Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, outStream);
|
||||
final TransformerFactory factory = TransformerFactory.newInstance();
|
||||
final Transformer transformer = factory.newTransformer();
|
||||
final DOMSource src = new DOMSource(fo);
|
||||
final Result res = new SAXResult(fop.getDefaultHandler());
|
||||
transformer.transform(src, res);
|
||||
|
||||
outStream.close();
|
||||
}
|
||||
|
||||
private Transformer createTransformer(final String styleFile) throws Exception {
|
||||
final TransformerFactory factory = TransformerFactory.newInstance();
|
||||
final Transformer transformer = factory.newTransformer(new StreamSource(styleFile));
|
||||
|
||||
return transformer;
|
||||
}
|
||||
|
||||
private InputStream getInputStream(final String input) throws IOException {
|
||||
final URL url = new URL(input);
|
||||
final HttpURLConnection httpcon = (HttpURLConnection) url.openConnection();
|
||||
httpcon.addRequestProperty("User-Agent", "Mozilla/4.0");
|
||||
return httpcon.getInputStream();
|
||||
}
|
||||
|
||||
private void fixXML(final String input, final String output) throws IOException {
|
||||
final BufferedReader reader = new BufferedReader(new FileReader(input));
|
||||
final FileWriter writer = new FileWriter(output);
|
||||
String line = reader.readLine();
|
||||
int count = 0;
|
||||
while (line != null) {
|
||||
line = line.replaceAll("”", "\"");
|
||||
line = line.replaceAll("“", "\"");
|
||||
// line = line.replaceAll("[^\\x00-\\x7F]", "");
|
||||
|
||||
if (line.contains("info>")) {
|
||||
writer.write(line.replace("info>", "section>"));
|
||||
} else if (!((line.startsWith("<?xml") || line.startsWith("<article") || line.startsWith("</article")) && (count > 4))) {
|
||||
writer.write(line.replaceAll("xml:id=\"", "xml:id=\"" + count));
|
||||
}
|
||||
writer.write("\n");
|
||||
|
||||
line = reader.readLine();
|
||||
count++;
|
||||
}
|
||||
writer.write("</article>");
|
||||
reader.close();
|
||||
writer.close();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
*.class
|
||||
|
||||
#folders#
|
||||
/target
|
||||
/neoDb*
|
||||
/data
|
||||
/src/main/webapp/WEB-INF/classes
|
||||
*/META-INF/*
|
||||
|
||||
# Packaged files #
|
||||
*.war
|
||||
*.ear
|
||||
@@ -1,13 +0,0 @@
|
||||
transformation html2docbook;
|
||||
|
||||
section HTML {
|
||||
encoding = "windows-1252";
|
||||
exclude = ["//h3[contains(.,'I usually')]", "//*[@id='toc_container']", "//h2/span[@id='Table_of_Contents']/../following-sibling::ul", "//h2/span[@id='Table_of_Contents']/..", "//*[@id='disqus_thread']","//head","//*[@class='custom-design-100']","//*[@class='custom-design-114']", "//form","//*[@src]","//*[@id='inner-wrapper']/*[position()<7]" , "//*[@class='post-meta']" , "//*[@class='entry-title']","//*[@id='respond']" ,"//*[@id='comments']","//*[@class='post-entries']","//*[@class='social']/../../h3[last()]" ,"//*[@class='social']/.."];
|
||||
section-numbering-pattern = "(((\d\.)+)?\d?\.?\p{Z}*).*";
|
||||
}
|
||||
|
||||
section DocBook {
|
||||
add-index = false;
|
||||
decompose-tables = false;
|
||||
encoding = "UTF-8";
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
The DocBook XSL stylesheets are maintained by Norman Walsh,
|
||||
<[email protected]>, and members of the DocBook Project,
|
||||
<[email protected]>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
To view a list of all open DocBook Project XSL stylesheet bugs:
|
||||
|
||||
http://docbook.sf.net/tracker/xsl/bugs
|
||||
|
||||
To submit a bug report against the stylesheets:
|
||||
|
||||
http://docbook.sf.net/tracker/submit/bug
|
||||
|
||||
To do a full-text search of all DocBook Project issues:
|
||||
|
||||
http://docbook.sf.net/tracker/search
|
||||
|
||||
Discussion about the DocBook Project XSL stylesheets takes place
|
||||
on the docbook-apps mailing list:
|
||||
|
||||
http://wiki.docbook.org/topic/DocBookAppsMailingList
|
||||
|
||||
Real-time discussion takes place on IRC:
|
||||
|
||||
http://wiki.docbook.org/topic/DocBookIrcChannel
|
||||
irc://irc.freenode.net/docbook
|
||||
@@ -1,48 +0,0 @@
|
||||
Copyright
|
||||
---------
|
||||
Copyright (C) 1999-2007 Norman Walsh
|
||||
Copyright (C) 2003 Jiří Kosek
|
||||
Copyright (C) 2004-2007 Steve Ball
|
||||
Copyright (C) 2005-2008 The DocBook Project
|
||||
Copyright (C) 2011-2012 O'Reilly Media
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the ``Software''), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
Except as contained in this notice, the names of individuals
|
||||
credited with contribution to this software shall not be used in
|
||||
advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization
|
||||
from the individuals in question.
|
||||
|
||||
Any stylesheet derived from this Software that is publically
|
||||
distributed will be identified with a different name and the
|
||||
version strings in any derived Software will be changed so that
|
||||
no possibility of confusion between the derived package and this
|
||||
Software will exist.
|
||||
|
||||
Warranty
|
||||
--------
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER
|
||||
CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Contacting the Author
|
||||
---------------------
|
||||
The DocBook XSL stylesheets are maintained by Norman Walsh,
|
||||
<[email protected]>, and members of the DocBook Project,
|
||||
<[email protected]>
|
||||
@@ -1,88 +0,0 @@
|
||||
$Id: INSTALL 6145 2006-08-06 13:13:03Z xmldoc $
|
||||
|
||||
INSTALL file for the DocBook XSL stylesheets distribution
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Case #1: Installation using a package management system
|
||||
----------------------------------------------------------------------
|
||||
If you have installed the DocBook XSL distribution using "apt-get",
|
||||
"yum", "urpmi", or some similar package-management front-end,
|
||||
then, as part of the package installation, the stylesheets have
|
||||
already been automatically installed in the appropriate location
|
||||
for your system, and your XML catalog environment has probably
|
||||
been updated to use that location.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Case #2: Installing manually
|
||||
----------------------------------------------------------------------
|
||||
If you have downloaded a docbook-xsl zip, tar.gz, or tar.bz2
|
||||
file, use the following steps to install it.
|
||||
|
||||
1. Move the zip, tar.gz, or tar.bz2 file to the directory where
|
||||
you'd like to install it (not to a temporary directory).
|
||||
|
||||
2. unzip or untar/uncompress the file
|
||||
|
||||
That will create a docbook-xsl-$VERSION directory (where
|
||||
$VERSION is the version number for the release).
|
||||
|
||||
The remaining steps are all OPTIONAL. They are intended to
|
||||
automatically update your user environment with XML Catalog
|
||||
information about the DocBook XSL distribution. You are NOT
|
||||
REQUIRED to complete these remaining steps. However, if you do
|
||||
not, and you want to use XML catalogs with the DocBook XSL
|
||||
stylesheets, you will need to manually update your XML catalog
|
||||
environment
|
||||
|
||||
3. Change to the docbook-xsl-$VERSION directory and execute the
|
||||
install.sh script:
|
||||
|
||||
./install.sh
|
||||
|
||||
That will launch an interactive installer, which will emit a
|
||||
series of prompts for you to respond to.
|
||||
|
||||
To instead run it non-interactively without being prompted
|
||||
for confirmation of the changes it makes, invoke it with the
|
||||
"--batch" switch, like this:
|
||||
|
||||
./install.sh --batch
|
||||
|
||||
After the process is complete, the installer will emit a
|
||||
message with a command you need to run in order to source
|
||||
your environment for use with the stylesheets.
|
||||
|
||||
4. To test that he installation has updated your environment
|
||||
correctly, execute the test.sh script:
|
||||
|
||||
./test.sh
|
||||
|
||||
That will test your XML catalog environment, using both the
|
||||
xmlcatalog application and the Apache XML Commons Resolver.
|
||||
|
||||
NOTE: The test.sh file is not created until the install.sh
|
||||
file is run for the first time.
|
||||
|
||||
5. (UNINSTALLING) If/when you want to uninstall the release,
|
||||
execute the uninstall.sh script.
|
||||
|
||||
./uninstall.sh
|
||||
|
||||
To instead run it non-interactively without being prompted
|
||||
for confirmation of the changes it makes, invoke it with the
|
||||
"--batch" switch, like this:
|
||||
|
||||
./uninstall.sh --batch
|
||||
|
||||
NOTE: The uninstall.sh file is not created until the install.sh
|
||||
file is run for the first time.
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Note to packagers
|
||||
----------------------------------------------------------------------
|
||||
The install.sh, .CatalogManager.properties.example, and .urilist
|
||||
files should not be packaged. They are useful only to users who
|
||||
are installing the stylesheets manually.
|
||||
|
||||
The catalog.xml file should be packaged.
|
||||
@@ -1,89 +0,0 @@
|
||||
# $Id: Makefile.tests 8481 2009-07-13 20:18:41Z abdelazer $
|
||||
#
|
||||
# This makefile does a "smoketest" of stylesheets for various
|
||||
# output formats in the DocBook XSL Stylesheets release package.
|
||||
# It doesn't actually check the output -- it's just useful for
|
||||
# confirming whether each XSLT transformation actually executes
|
||||
# successfully without any errors.
|
||||
#
|
||||
# To use it, run "make check" or just "make"
|
||||
|
||||
XSLTPROC=xsltproc
|
||||
XSLTPROC_FLAGS=
|
||||
|
||||
TESTFILE=tests/refentry.007.xml
|
||||
TESTFILE_NS=tests/refentry.007.ns.xml
|
||||
|
||||
NORMAL_STYLES=fo/docbook.xsl html/docbook.xsl xhtml/docbook.xsl
|
||||
NORMAL_PROFILE_STYLES=fo/profile-docbook.xsl html/profile-docbook.xsl xhtml/profile-docbook.xsl
|
||||
CHUNK_STYLES=html/chunk.xsl html/onechunk.xsl xhtml/chunk.xsl xhtml/onechunk.xsl
|
||||
HELP_STYLES=htmlhelp/htmlhelp.xsl javahelp/javahelp.xsl eclipse/eclipse.xsl
|
||||
MULTIFILE_STYLES=$(CHUNK_STYLES) $(HELP_STYLES)
|
||||
CHUNK_PROFILE_STYLES=html/profile-chunk.xsl html/profile-onechunk.xsl xhtml/profile-chunk.xsl xhtml/profile-onechunk.xsl
|
||||
HELP_PROFILE_STYLES=htmlhelp/profile-htmlhelp.xsl eclipse/profile-eclipse.xsl javahelp/profile-javahelp.xsl
|
||||
MULTIFILE_PROFILE_STYLES=$(CHUNK_PROFILE_STYLES) $(HELP_PROFILE_STYLES)
|
||||
|
||||
MAN_STYLE=manpages/docbook.xsl
|
||||
MAN_PROFILE_STYLE=manpages/profile-docbook.xsl
|
||||
|
||||
TWO_PROFILE_STYLE=profiling/profile.xsl
|
||||
|
||||
ROUNDTRIP_STYLES=roundtrip/dbk2ooo.xsl roundtrip/dbk2pages.xsl roundtrip/dbk2wordml.xsl
|
||||
SLIDES_STYLES=slides/html/default.xsl slides/xhtml/default.xsl slides/fo/plain.xsl
|
||||
WEBSITE_STYLES=website/website.xsl
|
||||
WEBSITE_CHUNK_STYLES=website/chunk-website.xsl
|
||||
|
||||
# chunked output gets written to TMP_OUTPUT_DIR
|
||||
TMP_OUTPUT_DIR=/tmp/smoketest-output/
|
||||
# if you don't want TMP_OUTPUT_DIR and its contents deleted, unset
|
||||
# SMOKETEST_CLEAN_TARGET; e.g. "make check SMOKETEST_CLEAN_TARGET=''"
|
||||
SMOKETEST_CLEAN_TARGET=smoketest-clean
|
||||
|
||||
check: smoketest-make-tmp-dir smoketest-normal smoketest-normal-profile smoketest-chunk smoketest-chunk-profile smoketest-man smoketest-man-profile smoketest-two-profile $(SMOKETEST_CLEAN_TARGET)
|
||||
|
||||
smoketest-make-tmp-dir:
|
||||
$(RM) -r $(TMP_OUTPUT_DIR)
|
||||
mkdir '$(TMP_OUTPUT_DIR)'
|
||||
|
||||
smoketest-normal:
|
||||
for stylesheet in $(NORMAL_STYLES); do \
|
||||
echo "$(XSLT) $(TESTFILE) $$stylesheet > /dev/null"; \
|
||||
$(XSLT) $(TESTFILE) $$stylesheet > /dev/null; \
|
||||
echo "$(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null"; \
|
||||
$(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null; \
|
||||
done
|
||||
|
||||
smoketest-normal-profile:
|
||||
for stylesheet in $(NORMAL_PROFILE_STYLES); do \
|
||||
echo "$(XSLT) $(TESTFILE) $$stylesheet > /dev/null"; \
|
||||
$(XSLT) $(TESTFILE) $$stylesheet > /dev/null; \
|
||||
echo "$(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null"; \
|
||||
$(XSLT) $(TESTFILE_NS) $$stylesheet > /dev/null; \
|
||||
done
|
||||
|
||||
smoketest-chunk:
|
||||
for stylesheet in $(MULTIFILE_STYLES) ; do \
|
||||
$(XSLT) $(TESTFILE) $$stylesheet manifest.in.base.dir=1 base.dir=$(TMP_OUTPUT_DIR) ; \
|
||||
$(XSLT) $(TESTFILE_NS) $$stylesheet manifest.in.base.dir=1 base.dir=$(TMP_OUTPUT_DIR) ; \
|
||||
done;
|
||||
|
||||
smoketest-chunk-profile:
|
||||
for stylesheet in $(MULTIFILE_PROFILE_STYLES) ; do \
|
||||
$(XSLT) $(TESTFILE) $$stylesheet manifest.in.base.dir=1 base.dir=$(TMP_OUTPUT_DIR) ; \
|
||||
$(XSLT) $(TESTFILE_NS) $$stylesheet manifest.in.base.dir=1 base.dir=$(TMP_OUTPUT_DIR) ; \
|
||||
done;
|
||||
|
||||
smoketest-man:
|
||||
$(XSLT) $(TESTFILE) $(MAN_STYLE) man.output.in.separate.dir=1 man.output.base.dir=$(TMP_OUTPUT_DIR) ; \
|
||||
$(XSLT) $(TESTFILE_NS) $(MAN_STYLE) man.output.in.separate.dir=1 man.output.base.dir=$(TMP_OUTPUT_DIR) ;
|
||||
|
||||
smoketest-man-profile:
|
||||
$(XSLT) $(TESTFILE) $(MAN_PROFILE_STYLE) man.output.in.separate.dir=1 man.output.base.dir=$(TMP_OUTPUT_DIR) ; \
|
||||
$(XSLT) $(TESTFILE_NS) $(MAN_PROFILE_STYLE) man.output.in.separate.dir=1 man.output.base.dir=$(TMP_OUTPUT_DIR) ;
|
||||
|
||||
smoketest-two-profile:
|
||||
$(XSLT) $(TESTFILE_NS) $(TWO_PROFILE_STYLE) > /dev/null ;
|
||||
|
||||
smoketest-clean:
|
||||
$(RM) -r $(TMP_OUTPUT_DIR)
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
Changes since the 1.78.0 release
|
||||
|
||||
Note: This document lists changes only since the 1.78.0 release. If you instead
|
||||
want a record of the complete list of changes for the codebase over its entire
|
||||
history, you can obtain one by running the following commands:
|
||||
|
||||
svn checkout https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/xsl
|
||||
svn log --xml --verbose xsl > ChangeHistory.xml
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
Table of Contents
|
||||
|
||||
Release Notes: 1.78.1
|
||||
|
||||
Common
|
||||
FO
|
||||
HTML
|
||||
Manpages
|
||||
Webhelp
|
||||
Params
|
||||
Highlighting
|
||||
|
||||
Release Notes: 1.78.1
|
||||
|
||||
The following is a list of changes that have been made since the 1.78.0
|
||||
release.
|
||||
|
||||
Common
|
||||
|
||||
The following changes have been made to the common code since the 1.78.0
|
||||
release.
|
||||
|
||||
• Robert Stayton: titles.xsl
|
||||
|
||||
Make sure part and set titleabbrev are used in mode="titleabbrev.markup"
|
||||
|
||||
• Robert Stayton: titles.xsl
|
||||
|
||||
Add empty default template for titleabbrev since it is always processed in a mode.
|
||||
|
||||
• Robert Stayton: gentext.xsl
|
||||
|
||||
Make consistent handling of titleabbrev in xrefs.
|
||||
|
||||
• Robert Stayton: titles.xsl
|
||||
|
||||
for missing title in xref, provide parent information of target to help locate problem element.
|
||||
Process bridgehead in mode="title.markup", not normal mode.
|
||||
|
||||
• Jirka Kosek: l10n.xsl
|
||||
|
||||
Fixed bug #3598963
|
||||
|
||||
• Robert Stayton: gentext.xsl; labels.xsl
|
||||
|
||||
Make sure bridgeheads are not numbered in all contexts, including html title attributes.
|
||||
|
||||
FO
|
||||
|
||||
The following changes have been made to the fo code since the 1.78.0 release.
|
||||
|
||||
• Robert Stayton: division.xsl
|
||||
|
||||
Fix bug where part TOC not generated when partintro is present.
|
||||
|
||||
• Jirka Kosek: xref.xsl
|
||||
|
||||
Footnotes can't be placed into fo:float
|
||||
|
||||
• Robert Stayton: titlepage.templates.xml
|
||||
|
||||
Remove margin-left when start-indent is used because they interfere
|
||||
with each other.
|
||||
|
||||
• Robert Stayton: fo.xsl; pagesetup.xsl
|
||||
|
||||
Use dingbat.fontset rather than dingbat.font.family so it falls
|
||||
back to symbol font if glyph not found, like other font properties.
|
||||
|
||||
• Robert Stayton: inline.xsl
|
||||
|
||||
Change last instance of inline.charseq in inline glossterm to
|
||||
inline.italicseq so it is consistent with the others.
|
||||
|
||||
• Robert Stayton: xref.xsl
|
||||
|
||||
Make consistent handling of titleabbrev in xrefs.
|
||||
|
||||
HTML
|
||||
|
||||
The following changes have been made to the html code since the 1.78.0 release.
|
||||
|
||||
• Robert Stayton: admon.xsl
|
||||
|
||||
Turn off $admon.style if $make.clean.html is set to non-zero.
|
||||
|
||||
• Jirka Kosek: highlight.xsl
|
||||
|
||||
Added new definitions for syntax highlighting
|
||||
|
||||
• Robert Stayton: chunk-common.xsl
|
||||
|
||||
Make active.olink.hrefs param work for chunked output too.
|
||||
|
||||
• Robert Stayton: xref.xsl
|
||||
|
||||
Make consistent handling of titleabbrev in xrefs.
|
||||
|
||||
• Robert Stayton: graphics.xsl
|
||||
|
||||
Add round() function when pixel counts are used for image width and height.
|
||||
|
||||
• Robert Stayton: glossary.xsl
|
||||
|
||||
fix missing class and id attributes on glossterm and glossdef.
|
||||
|
||||
• Robert Stayton: autoidx.xsl
|
||||
|
||||
Fix bug where prefer.index.titleabbrev ignored info/titleabbrev.
|
||||
|
||||
Manpages
|
||||
|
||||
The following changes have been made to the manpages code since the 1.78.0
|
||||
release.
|
||||
|
||||
• Robert Stayton: utility.xsl
|
||||
|
||||
Fix bug 3599520: spurious newline in para when starts with
|
||||
whitespace and inline element.
|
||||
|
||||
Webhelp
|
||||
|
||||
The following changes have been made to the webhelp code since the 1.78.0
|
||||
release.
|
||||
|
||||
• David Cramer: xsl/webhelp-common.xsl
|
||||
|
||||
Webhelp: Fix test for webhelp.include.search.tab param
|
||||
|
||||
• David Cramer: Makefile.sample
|
||||
|
||||
Webhelp: Fix order of args to xsltproc
|
||||
|
||||
• David Cramer: docsrc/readme.xml
|
||||
|
||||
Webhelp: Turn on xinclude-test.xml in readme to demo xinclude functionality
|
||||
|
||||
• David Cramer: Makefile; Makefile.sample
|
||||
|
||||
Webhelp: In Makefiles, do xinclude in first pass at document
|
||||
|
||||
Params
|
||||
|
||||
The following changes have been made to the params code since the 1.78.0
|
||||
release.
|
||||
|
||||
• David Cramer: webhelp.include.search.tab.xml
|
||||
|
||||
Webhelp: Fix test for webhelp.include.search.tab param
|
||||
|
||||
• Robert Stayton: article.appendix.title.properties.xml
|
||||
|
||||
Remove unneeded margin-left property from article appendix title.
|
||||
It interferes with the start-indent property.
|
||||
|
||||
Highlighting
|
||||
|
||||
The following changes have been made to the highlighting code since the 1.78.0
|
||||
release.
|
||||
|
||||
• Jirka Kosek: c-hl.xml; cpp-hl.xml; sql2003-hl.xml; php-hl.xml; upc-hl.xml;
|
||||
bourne-hl.xml; ⋯
|
||||
|
||||
Added new definitions for syntax highlighting
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,174 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<article>
|
||||
<info>
|
||||
<abstract>
|
||||
<para><emphasis role="strong">Note:</emphasis> This
|
||||
document lists changes only since the 1.78.0 release.
|
||||
If you instead want a record of the complete list of
|
||||
changes for the codebase over its entire history, you
|
||||
can obtain one by running the following commands:
|
||||
|
||||
<screen> <code>svn checkout https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/xsl</code>
|
||||
<code>svn log --xml --verbose xsl > ChangeHistory.xml</code></screen></para>
|
||||
</abstract>
|
||||
</info><title>Changes since the 1.78.0 release</title>
|
||||
|
||||
<sect1 xml:id="V1.78.1">
|
||||
<title>Release Notes: 1.78.1</title>
|
||||
<para>The following is a list of changes that have been made
|
||||
since the 1.78.0 release.</para>
|
||||
|
||||
<sect2 xml:id="V1.78.1_Common">
|
||||
<title>Common</title>
|
||||
<para>The following changes have been made to the
|
||||
<filename>common</filename> code
|
||||
since the 1.78.0 release.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: titles.xsl</literal></para><screen><phrase role="commit-message">Make sure part and set <tag>titleabbrev</tag> are used in mode="titleabbrev.markup"</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: titles.xsl</literal></para><screen><phrase role="commit-message">Add empty default template for <tag>titleabbrev</tag> since it is always processed in a mode.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: gentext.xsl</literal></para><screen><phrase role="commit-message">Make consistent handling of <tag>titleabbrev</tag> in xrefs.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: titles.xsl</literal></para><screen><phrase role="commit-message">for missing <tag>title</tag> in <tag>xref</tag>, provide parent information of target to help locate problem element.
|
||||
Process <tag>bridgehead</tag> in mode="title.markup", not normal mode.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Jirka Kosek: l10n.xsl</literal></para><screen><phrase role="commit-message">Fixed bug #3598963</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: gentext.xsl; labels.xsl</literal></para><screen><phrase role="commit-message">Make sure bridgeheads are not numbered in all contexts, including html <tag>title</tag> attributes.</phrase></screen>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2><!--end of Common changes for 1.78.1-->
|
||||
|
||||
<sect2 xml:id="V1.78.1_FO">
|
||||
<title>FO</title>
|
||||
<para>The following changes have been made to the
|
||||
<filename>fo</filename> code
|
||||
since the 1.78.0 release.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: division.xsl</literal></para><screen><phrase role="commit-message">Fix bug where part <tag>TOC</tag> not generated when <tag>partintro</tag> is present.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Jirka Kosek: xref.xsl</literal></para><screen><phrase role="commit-message">Footnotes can't be placed into fo:float</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: titlepage.templates.xml</literal></para><screen><phrase role="commit-message">Remove margin-left when start-indent is used because they interfere
|
||||
with each other.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: fo.xsl; pagesetup.xsl</literal></para><screen><phrase role="commit-message">Use dingbat.fontset rather than <parameter>dingbat.font.family</parameter> so it falls
|
||||
back to <tag>symbol</tag> font if glyph not found, like other font properties.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: inline.xsl</literal></para><screen><phrase role="commit-message">Change last instance of inline.charseq in inline <tag>glossterm</tag> to
|
||||
inline.italicseq so it is consistent with the others.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: xref.xsl</literal></para><screen><phrase role="commit-message">Make consistent handling of <tag>titleabbrev</tag> in xrefs.</phrase></screen>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2><!--end of FO changes for 1.78.1-->
|
||||
|
||||
<sect2 xml:id="V1.78.1_HTML">
|
||||
<title>HTML</title>
|
||||
<para>The following changes have been made to the
|
||||
<filename>html</filename> code
|
||||
since the 1.78.0 release.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: admon.xsl</literal></para><screen><phrase role="commit-message">Turn off $admon.style if $make.clean.html is set to non-zero.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Jirka Kosek: highlight.xsl</literal></para><screen><phrase role="commit-message">Added new definitions for syntax highlighting</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: chunk-common.xsl</literal></para><screen><phrase role="commit-message">Make active.olink.hrefs param work for chunked output too.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: xref.xsl</literal></para><screen><phrase role="commit-message">Make consistent handling of <tag>titleabbrev</tag> in xrefs.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: graphics.xsl</literal></para><screen><phrase role="commit-message">Add round() <tag>function</tag> when pixel counts are used for image width and height.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: glossary.xsl</literal></para><screen><phrase role="commit-message">fix missing class and id attributes on <tag>glossterm</tag> and <tag>glossdef</tag>.</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: autoidx.xsl</literal></para><screen><phrase role="commit-message">Fix bug where prefer.index.titleabbrev ignored <tag>info</tag>/<tag>titleabbrev</tag>.</phrase></screen>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2><!--end of HTML changes for 1.78.1-->
|
||||
|
||||
<sect2 xml:id="V1.78.1_Manpages">
|
||||
<title>Manpages</title>
|
||||
<para>The following changes have been made to the
|
||||
<filename>manpages</filename> code
|
||||
since the 1.78.0 release.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: utility.xsl</literal></para><screen><phrase role="commit-message">Fix bug 3599520: spurious newline in <tag>para</tag> when starts with
|
||||
whitespace and inline element.</phrase></screen>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2><!--end of Manpages changes for 1.78.1-->
|
||||
|
||||
<sect2 xml:id="V1.78.1_Webhelp">
|
||||
<title>Webhelp</title>
|
||||
<para>The following changes have been made to the
|
||||
<filename>webhelp</filename> code
|
||||
since the 1.78.0 release.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>David Cramer: xsl/webhelp-common.xsl</literal></para><screen><phrase role="commit-message">Webhelp: Fix test for <parameter>webhelp.include.search.tab</parameter> param</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>David Cramer: Makefile.sample</literal></para><screen><phrase role="commit-message">Webhelp: Fix order of args to xsltproc</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>David Cramer: docsrc/readme.xml</literal></para><screen><phrase role="commit-message">Webhelp: Turn on xinclude-test.xml in readme to demo xinclude functionality</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>David Cramer: Makefile; Makefile.sample</literal></para><screen><phrase role="commit-message">Webhelp: In Makefiles, do xinclude in first pass at document</phrase></screen>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2><!--end of Webhelp changes for 1.78.1-->
|
||||
|
||||
<sect2 xml:id="V1.78.1_Params">
|
||||
<title>Params</title>
|
||||
<para>The following changes have been made to the
|
||||
<filename>params</filename> code
|
||||
since the 1.78.0 release.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>David Cramer: webhelp.include.search.tab.xml</literal></para><screen><phrase role="commit-message">Webhelp: Fix test for <parameter>webhelp.include.search.tab</parameter> param</phrase></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>Robert Stayton: article.appendix.title.properties.xml</literal></para><screen><phrase role="commit-message">Remove unneeded margin-left property from <tag>article</tag> <tag>appendix</tag> <tag>title</tag>.
|
||||
It interferes with the start-indent property.</phrase></screen>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2><!--end of Params changes for 1.78.1-->
|
||||
|
||||
<sect2 xml:id="V1.78.1_Highlighting">
|
||||
<title>Highlighting</title>
|
||||
<para>The following changes have been made to the
|
||||
<filename>highlighting</filename> code
|
||||
since the 1.78.0 release.</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>Jirka Kosek: c-hl.xml; cpp-hl.xml; sql2003-hl.xml; php-hl.xml; upc-hl.xml; bourne-hl.xml; ⋯</literal></para><screen><phrase role="commit-message">Added new definitions for syntax highlighting</phrase></screen>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2><!--end of Highlighting changes for 1.78.1-->
|
||||
|
||||
</sect1>
|
||||
</article>
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
----------------------------------------------------------------------
|
||||
README file for the DocBook XSL Stylesheets
|
||||
----------------------------------------------------------------------
|
||||
$Id: README 9731 2013-03-17 05:01:54Z bobstayton $
|
||||
|
||||
These are XSL stylesheets for transforming DocBook XML document
|
||||
instances into various output formats.
|
||||
|
||||
This README file provides only very minimal documentation on using
|
||||
the stylesheets. For more complete information, see Bob Stayton's
|
||||
book "DocBook XSL: The Complete Guide", available online at:
|
||||
|
||||
http://www.sagehill.net/docbookxsl/
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Installation
|
||||
----------------------------------------------------------------------
|
||||
See the INSTALL file for information about installing this release.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
How to use the stylesheets
|
||||
----------------------------------------------------------------------
|
||||
The base canonical URI for these stylesheets is:
|
||||
|
||||
http://docbook.sourceforge.net/release/xsl/current/
|
||||
|
||||
You call any of the stylesheets in this distribution by doing one
|
||||
of the following:
|
||||
|
||||
- Use the base canonical URI in combination with one of the
|
||||
pathnames below. For example, for "chunked" HTML, output:
|
||||
|
||||
http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
|
||||
|
||||
If your system has a working XML Catalog or SGML Catalog setup
|
||||
(most Linux systems do), then that URI will automatically be
|
||||
resolved and replaced with a local pathname on your system.
|
||||
|
||||
- Use a "real" local system base path in combination with one of
|
||||
the pathnames below. For example, for "chunked" HTML, output:
|
||||
|
||||
/usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl
|
||||
|
||||
To transform documents created with the standard DocBook
|
||||
schema/DTD, use one of the following stylesheets:
|
||||
|
||||
fo/docbook.xsl - for XSL-FO
|
||||
|
||||
html/docbook.xsl - for HTML (as a single file)
|
||||
html/chunk.xsl - for HTML (chunked into multiple files)
|
||||
html/onechunk.xsl - for HTML (chunked output in single file)
|
||||
|
||||
xhtml/*.xsl - for XHTML versions of the above
|
||||
|
||||
xhtml-1_1/*.xsl - for XHTML 1.1 versions of the above
|
||||
|
||||
xhtml5/*.xsl - for XHTML5 versions of the above
|
||||
|
||||
epub/docbook.xsl - for .epub version 2 and earlier
|
||||
epub3/docbook.xsl - for .epub version 3 and later
|
||||
|
||||
htmlhelp/htmlhelp.xsl - for HTML Help
|
||||
javahelp/javahelp.xsl - for JavaHelp
|
||||
eclipse/eclipse.xsl - for Eclipse Help
|
||||
|
||||
manpages/docbook.xsl - for groff/nroff man pages
|
||||
|
||||
*/profile-* - single-pass-profiling versions of all above
|
||||
|
||||
roundtrip/*.xsl - for DocBook to WordML, etc., to DocBook
|
||||
|
||||
assembly/assemble.xsl - converts an assembly into a DocBook document
|
||||
assembly/topic-maker-chunk.xsl
|
||||
- converts a DocBook document into an assembly
|
||||
with topic files.
|
||||
|
||||
webhelp/build.xml - Ant script to generate webhelp output.
|
||||
webhelp/Makefile - Makefile to generate webhelp output.
|
||||
|
||||
To transform documents created with the DocBook Slides schema/DTD,
|
||||
use one of the following stylesheets:
|
||||
|
||||
slides/xhtml/*.xsl - for XHTML slides of various kinds
|
||||
slides/fo/plain.xsl - for XSL-FO slides
|
||||
|
||||
To transform documents created with the DocBook Website
|
||||
schema/DTD, use one of the following stylesheets:
|
||||
|
||||
website/website.xsl - for non-tabular, non-chunked output
|
||||
website/tabular.xsl - for tabular, non-chunked output
|
||||
website/chunk-* - for chunked output
|
||||
|
||||
To generate a titlepage customization layer from a titlepage spec:
|
||||
|
||||
template/titlepage.xsl
|
||||
|
||||
For fo titlepage customizations, set the stylesheet parameter named 'ns'
|
||||
to 'http://www.w3.org/1999/XSL/Format' when using this stylesheet.
|
||||
For xhtml titlepage customizations, set the stylesheet parameter named 'ns'
|
||||
to 'http://www.w3.org/1999/xhtml' when using this stylesheet.
|
||||
|
||||
For details about creating titlepage spec files and generating and
|
||||
using titlepage customization layers, see "DocBook XSL: The
|
||||
Complete Guide" <http://www.sagehill.net/docbookxsl/>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Manifest
|
||||
----------------------------------------------------------------------
|
||||
AUTHORS contact information
|
||||
BUGS about known problems
|
||||
COPYING copyright information
|
||||
INSTALL installation instructions
|
||||
README this file
|
||||
RELEASE.* per-release cumulative summaries of user-visible changes
|
||||
TODO about planned features not yet implemented
|
||||
VERSION release metadata, including the current version
|
||||
number (note that the VERSION file is an XSL stylesheet)
|
||||
NEWS changes since the last public release (for a cumulative list of
|
||||
changes, see the ChangeHistory.xml file)
|
||||
|
||||
assembly/ for making and processing DocBook assemblies.
|
||||
common/ code used among several output formats (HTML, FO, manpages,...)
|
||||
docsrc/ documentation sources
|
||||
eclipse/ for producing Eclipse Help
|
||||
epub/ for producing .epub version 2.
|
||||
epub3/ for producing .epub version 3 and beyond.
|
||||
extensions/ DocBook XSL Java extensions
|
||||
fo/ for producing XSL-FO
|
||||
highlighting files used for adding source-code syntax highlighting in output
|
||||
html/ for producing HTML
|
||||
htmlhelp/ for producing HTML Help
|
||||
images/ images used in callouts and graphical admonitions
|
||||
javahelp/ for producing Java Help
|
||||
lib/ utility stylesheets with schema-independent functions
|
||||
manpages/ for producing groff/troff man pages
|
||||
profiling/ for profiling (omitting/including conditional text)
|
||||
roundtrip/ for "round trip" conversion among DocBook and
|
||||
various word-processor formats (WordML, etc.)
|
||||
slides/ for producing slides output (from Slides source)
|
||||
template/ templates for building stylesheet customization layers
|
||||
tools/ assorted supplementary tools
|
||||
webhelp/ templates and scripts for generating webhelp output
|
||||
website/ for producing website output (from Website source)
|
||||
xhtml/ for producing XHTML
|
||||
xhtml-1_1/ for producing (stricter) XHTML 1.1
|
||||
xhtml5/ for producing XHTML5
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Changes
|
||||
----------------------------------------------------------------------
|
||||
See the NEWS file for changes made since the previous release.
|
||||
|
||||
See the RELEASE-NOTES.html or RELEASE-NOTES.txt or RELEASE-NOTES.pdf
|
||||
files for per-release cumulative summaries of significant
|
||||
user-visible changes.
|
||||
|
||||
For online access to a hyperlinked view of all changes made over
|
||||
the entire history of the codebase, see the following:
|
||||
|
||||
http://docbook.svn.sourceforge.net/viewvc/docbook/trunk/xsl/?view=log
|
||||
|
||||
WARNING: That above change history is a very long list and may
|
||||
take a long time to load/download.
|
||||
|
||||
You can also create an XML-formatted "ChangeHistory.xml" copy of
|
||||
the complete change history for the codebase by running the
|
||||
following commands:
|
||||
|
||||
svn checkout https://docbook.svn.sf.net/svnroot/docbook/trunk/xsl
|
||||
svn log --xml --verbose xsl > ChangeHistory.xml
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Copyright information
|
||||
----------------------------------------------------------------------
|
||||
See the accompanying file named COPYING.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
9732
|
||||
@@ -1,23 +0,0 @@
|
||||
The "to do" list for the DocBook Project XSL stylesheets is
|
||||
maintained at Sourceforge. To view a list of all open feature
|
||||
requests for the stylesheets:
|
||||
|
||||
http://docbook.sf.net/tracker/xsl/requests
|
||||
|
||||
To submit a feature request against the stylesheets:
|
||||
|
||||
http://docbook.sf.net/tracker/submit/request
|
||||
|
||||
To do a full-text search of all DocBook Project issues:
|
||||
|
||||
http://docbook.sf.net/tracker/search
|
||||
|
||||
Discussion about the DocBook Project XSL stylesheets takes place
|
||||
on the docbook-apps mailing list:
|
||||
|
||||
http://wiki.docbook.org/topic/DocBookAppsMailingList
|
||||
|
||||
Real-time discussion takes place on IRC:
|
||||
|
||||
http://wiki.docbook.org/topic/DocBookIrcChannel
|
||||
irc://irc.freenode.net/docbook
|
||||
@@ -1,115 +0,0 @@
|
||||
<?xml version='1.0'?> <!-- -*- nxml -*- vim: set foldlevel=2: -->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
|
||||
xmlns:sf="http://sourceforge.net/"
|
||||
xmlns:dyn="http://exslt.org/dynamic"
|
||||
xmlns:saxon="http://icl.com/saxon"
|
||||
exclude-result-prefixes="fm sf"
|
||||
version='1.0'>
|
||||
|
||||
<xsl:param name="get"/>
|
||||
<xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/>
|
||||
<xsl:param name="Tag" select="concat('V',translate(string(document('')//fm:Version[1]),'.',''))"/>
|
||||
<xsl:param name="DistroTitle" select="string(document('')//fm:Branch[1])"/>
|
||||
<xsl:param name="sf-relid" select="0"/>
|
||||
|
||||
<xsl:param name="DistroName">docbook-xsl</xsl:param>
|
||||
<xsl:param name="PreviousRelease">1.78.0</xsl:param>
|
||||
<xsl:param name="PreviousReleaseRevision">9696</xsl:param>
|
||||
<xsl:param name="Revision">$Revision: 9731 $</xsl:param>
|
||||
<xsl:param name="VersionFileURL">$URL: https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/xsl/VERSION $</xsl:param>
|
||||
|
||||
<xsl:strip-space elements="fm:*"/>
|
||||
|
||||
<fm:project>
|
||||
<fm:Project>DocBook</fm:Project>
|
||||
<fm:Branch>XSL Stylesheets</fm:Branch>
|
||||
<!-- * set/keep fm:version as N.NN.N-pre except for official releases, -->
|
||||
<!-- * then after the release, revert it to N.NN.N-pre & check back in -->
|
||||
<fm:Version>1.78.1</fm:Version>
|
||||
<!--
|
||||
<fm:License>MIT/X Consortium License</fm:License>
|
||||
-->
|
||||
<fm:Release-Focus>
|
||||
<!-- * Initial freshmeat announcement -->
|
||||
<!-- * Documentation -->
|
||||
<!-- * Code cleanup -->
|
||||
<!-- * Minor feature enhancements -->
|
||||
* Major feature enhancements
|
||||
<!-- * Minor bugfixes -->
|
||||
<!-- * Major bugfixes -->
|
||||
<!-- * Minor security fixes -->
|
||||
<!-- * Major security fixes -->
|
||||
</fm:Release-Focus>
|
||||
<fm:Home-Page-URL>http://sourceforge.net/projects/docbook/</fm:Home-Page-URL>
|
||||
<fm:Gzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.tar.gz?download</fm:Gzipped-Tar-URL>
|
||||
<fm:Zipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.zip?download</fm:Zipped-Tar-URL>
|
||||
<fm:Bzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.bz2?download</fm:Bzipped-Tar-URL>
|
||||
<fm:Changelog-URL>http://sourceforge.net/project/shownotes.php?release_id={SFRELID}</fm:Changelog-URL>
|
||||
<fm:CVS-URL>http://docbook.svn.sourceforge.net/viewvc/docbook/</fm:CVS-URL>
|
||||
<fm:Mailing-List-URL>http://lists.oasis-open.org/archives/docbook-apps/</fm:Mailing-List-URL>
|
||||
<fm:Changes>This is a release with bugfixes and some enhancements.</fm:Changes>
|
||||
</fm:project>
|
||||
|
||||
<xsl:template match="/" priority="-100">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$get = 'Tag'">
|
||||
<xsl:value-of select="$Tag"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$get = 'PreviousRelease'">
|
||||
<xsl:value-of select="$PreviousRelease"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$get = 'PreviousReleaseRevision'">
|
||||
<xsl:value-of select="$PreviousReleaseRevision"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$get = 'DistroTitle'">
|
||||
<xsl:value-of select="$DistroTitle"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$get = 'VERSION'">
|
||||
<xsl:value-of select="$VERSION"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="$sf-relid = 0">
|
||||
<xsl:message terminate="yes">
|
||||
<xsl:text>You must specify the sf-relid as a parameter.</xsl:text>
|
||||
</xsl:message>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="//fm:project"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fm:project">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="fm:Changes" mode="text"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fm:Changes"/>
|
||||
|
||||
<xsl:template match="fm:Gzipped-Tar-URL|fm:Zipped-Tar-URL|fm:Bzipped-Tar-URL">
|
||||
<xsl:value-of select="local-name(.)"/>
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="substring-before(., '{DISTRONAME-VERSION}')"/>
|
||||
<xsl:value-of select="concat($DistroName, '-', $VERSION)"/>
|
||||
<xsl:value-of select="substring-after(., '{DISTRONAME-VERSION}')"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fm:Changelog-URL">
|
||||
<xsl:value-of select="local-name(.)"/>
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="substring-before(., '{SFRELID}')"/>
|
||||
<xsl:value-of select="$sf-relid"/>
|
||||
<xsl:value-of select="substring-after(., '{SFRELID}')"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fm:*">
|
||||
<xsl:value-of select="local-name(.)"/>
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="normalize-space(.)"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -1,115 +0,0 @@
|
||||
<?xml version='1.0'?> <!-- -*- nxml -*- vim: set foldlevel=2: -->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
|
||||
xmlns:sf="http://sourceforge.net/"
|
||||
xmlns:dyn="http://exslt.org/dynamic"
|
||||
xmlns:saxon="http://icl.com/saxon"
|
||||
exclude-result-prefixes="fm sf"
|
||||
version='1.0'>
|
||||
|
||||
<xsl:param name="get"/>
|
||||
<xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/>
|
||||
<xsl:param name="Tag" select="concat('V',translate(string(document('')//fm:Version[1]),'.',''))"/>
|
||||
<xsl:param name="DistroTitle" select="string(document('')//fm:Branch[1])"/>
|
||||
<xsl:param name="sf-relid" select="0"/>
|
||||
|
||||
<xsl:param name="DistroName">docbook-xsl</xsl:param>
|
||||
<xsl:param name="PreviousRelease">1.78.0</xsl:param>
|
||||
<xsl:param name="PreviousReleaseRevision">9696</xsl:param>
|
||||
<xsl:param name="Revision">$Revision: 9731 $</xsl:param>
|
||||
<xsl:param name="VersionFileURL">$URL: https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/xsl/VERSION $</xsl:param>
|
||||
|
||||
<xsl:strip-space elements="fm:*"/>
|
||||
|
||||
<fm:project>
|
||||
<fm:Project>DocBook</fm:Project>
|
||||
<fm:Branch>XSL Stylesheets</fm:Branch>
|
||||
<!-- * set/keep fm:version as N.NN.N-pre except for official releases, -->
|
||||
<!-- * then after the release, revert it to N.NN.N-pre & check back in -->
|
||||
<fm:Version>1.78.1</fm:Version>
|
||||
<!--
|
||||
<fm:License>MIT/X Consortium License</fm:License>
|
||||
-->
|
||||
<fm:Release-Focus>
|
||||
<!-- * Initial freshmeat announcement -->
|
||||
<!-- * Documentation -->
|
||||
<!-- * Code cleanup -->
|
||||
<!-- * Minor feature enhancements -->
|
||||
* Major feature enhancements
|
||||
<!-- * Minor bugfixes -->
|
||||
<!-- * Major bugfixes -->
|
||||
<!-- * Minor security fixes -->
|
||||
<!-- * Major security fixes -->
|
||||
</fm:Release-Focus>
|
||||
<fm:Home-Page-URL>http://sourceforge.net/projects/docbook/</fm:Home-Page-URL>
|
||||
<fm:Gzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.tar.gz?download</fm:Gzipped-Tar-URL>
|
||||
<fm:Zipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.zip?download</fm:Zipped-Tar-URL>
|
||||
<fm:Bzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.bz2?download</fm:Bzipped-Tar-URL>
|
||||
<fm:Changelog-URL>http://sourceforge.net/project/shownotes.php?release_id={SFRELID}</fm:Changelog-URL>
|
||||
<fm:CVS-URL>http://docbook.svn.sourceforge.net/viewvc/docbook/</fm:CVS-URL>
|
||||
<fm:Mailing-List-URL>http://lists.oasis-open.org/archives/docbook-apps/</fm:Mailing-List-URL>
|
||||
<fm:Changes>This is a release with bugfixes and some enhancements.</fm:Changes>
|
||||
</fm:project>
|
||||
|
||||
<xsl:template match="/" priority="-100">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$get = 'Tag'">
|
||||
<xsl:value-of select="$Tag"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$get = 'PreviousRelease'">
|
||||
<xsl:value-of select="$PreviousRelease"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$get = 'PreviousReleaseRevision'">
|
||||
<xsl:value-of select="$PreviousReleaseRevision"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$get = 'DistroTitle'">
|
||||
<xsl:value-of select="$DistroTitle"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$get = 'VERSION'">
|
||||
<xsl:value-of select="$VERSION"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="$sf-relid = 0">
|
||||
<xsl:message terminate="yes">
|
||||
<xsl:text>You must specify the sf-relid as a parameter.</xsl:text>
|
||||
</xsl:message>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="//fm:project"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fm:project">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="fm:Changes" mode="text"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fm:Changes"/>
|
||||
|
||||
<xsl:template match="fm:Gzipped-Tar-URL|fm:Zipped-Tar-URL|fm:Bzipped-Tar-URL">
|
||||
<xsl:value-of select="local-name(.)"/>
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="substring-before(., '{DISTRONAME-VERSION}')"/>
|
||||
<xsl:value-of select="concat($DistroName, '-', $VERSION)"/>
|
||||
<xsl:value-of select="substring-after(., '{DISTRONAME-VERSION}')"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fm:Changelog-URL">
|
||||
<xsl:value-of select="local-name(.)"/>
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="substring-before(., '{SFRELID}')"/>
|
||||
<xsl:value-of select="$sf-relid"/>
|
||||
<xsl:value-of select="substring-after(., '{SFRELID}')"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="fm:*">
|
||||
<xsl:value-of select="local-name(.)"/>
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="normalize-space(.)"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -1,195 +0,0 @@
|
||||
DocBook Assembly Stylesheets
|
||||
==============================
|
||||
[email protected]
|
||||
|
||||
This directory provides XSL stylesheets for working with
|
||||
DocBook assemblies. It is intended to enable working with
|
||||
<topic> and <assembly> elements, as defined in DocBook 5.1
|
||||
and later.
|
||||
|
||||
This kit currently supports most features of an assembly.
|
||||
See the "Unsupported Features" section below for details
|
||||
of what is not currently supported. These more advanced
|
||||
features will be supported as it is further developed.
|
||||
|
||||
|
||||
Content of this directory:
|
||||
--------------------------
|
||||
topic-maker-chunk.xsl - stylesheet to modularize an existing DB5 document.
|
||||
topic-maker.xsl - imported by topic-maker-chunk.xsl.
|
||||
assemble.xsl - stylesheet to process an <assembly> into a document.
|
||||
|
||||
|
||||
The toolkit consists of an assemble.xsl XSL stylesheet
|
||||
to process a DocBook <assembly> element to convert it
|
||||
to an assembled DocBook 5 document ready to be formatted.
|
||||
This stylesheet will enable users to structure a book from
|
||||
modular files.
|
||||
|
||||
To make it easy to initially create a modular book, this
|
||||
kit also includes a topic-maker-chunk.xsl XSL stylesheet
|
||||
to break apart an existing DocBook 5 book into modular
|
||||
files, and also create the associated <assembly> document.
|
||||
Then you can run the assemble.xsl stylesheet to put it
|
||||
back together as a single DocBook document.
|
||||
|
||||
|
||||
To create an assembly and topic files from a book or article document
|
||||
=======================================================================
|
||||
|
||||
If you have an existing DocBook 5 book or article document,
|
||||
you can convert it to an assembly and a collection of
|
||||
modular topic files. If you want to convert a DocBook 4
|
||||
document, you must first convert it to version 5.
|
||||
|
||||
For example, to disassemble a DocBook 5 book document named book.xml:
|
||||
|
||||
xsltproc --xinclude \
|
||||
--stringparam assembly.filename myassembly.xml \
|
||||
--stringparam base.dir topics/ \
|
||||
topic-maker-chunk.xsl \
|
||||
mybook.xml
|
||||
|
||||
This command will result in a master assembly file named
|
||||
'myassembly.xml' with a root element of <assembly>, containing
|
||||
a single <structure> element. It will also break up the
|
||||
content of the book into modular chunks that are output
|
||||
to the 'topics/' subdirectory as specified in the 'base.dir'
|
||||
parameter.
|
||||
|
||||
Options
|
||||
----------
|
||||
The name of the assembly file is set by the stylesheet param
|
||||
named 'assembly.filename', which should include the filename suffix.
|
||||
|
||||
Modular files are output to the directory location specified
|
||||
by the 'base.dir' parameter. If you want them in the current
|
||||
directory, then don't set that param.
|
||||
|
||||
By default the assembly element is output to the current
|
||||
directory, *not* into base.dir with the modular files.
|
||||
The <resources> element in the assembly has its xml:base
|
||||
attribute set to the value of 'base.dir', so that it is
|
||||
added to the paths to the modular files when processed.
|
||||
If you set the stylesheet param 'manifest.in.base.dir'
|
||||
to 1, then the assembly file is created in the base.dir
|
||||
directory and the xml:base attribute is omitted (since
|
||||
they are together in the same directory).
|
||||
|
||||
If you want the assembly file in 'base.dir' instead of
|
||||
the current directory, then set the stylesheet param
|
||||
'manifest.in.base.dir' to 1.
|
||||
|
||||
The stylesheet chunks a document into modules at the
|
||||
same boundaries as the chunking XHTML stylesheet, because
|
||||
it reuses many of the chunking stylesheet templates.
|
||||
You can alter the chunking behavior with the same options
|
||||
as for XHTML chunking.
|
||||
|
||||
For example, the stylesheet will chunk sections into topics
|
||||
down to section level 3 by default. To change that level,
|
||||
change the stylesheet param 'chunk.section.depth' to
|
||||
another value.
|
||||
|
||||
Finer control of chunking can be achieved by using
|
||||
the <?dbhtml stop-chunking?> processing instruction in
|
||||
the source file.
|
||||
|
||||
Many modular elements retain their original element name,
|
||||
such as glossary, bibliography, index, and such. By default, the
|
||||
stylesheet converts chapter, article, preface and section elements
|
||||
into <topic> modules. To change that list of
|
||||
converted element names, alter the stylesheet param named
|
||||
'topic.elements'. If that param is empty, then no elements
|
||||
will be converted to <topic>, so they will all retain their
|
||||
original element names.
|
||||
|
||||
Modular filenames use the same naming scheme as the chunking
|
||||
XHTML stylesheet, and supports the same file naming options such as
|
||||
the param 'use.id.as.filename', which is set to 1 by default.
|
||||
Note that the stylesheet param 'html.ext' is set to '.xml'
|
||||
because it is producing modular XML files, not HTML files.
|
||||
|
||||
Root element conversion
|
||||
------------------------
|
||||
By default, the root element of the original document is
|
||||
also converted to a module, and <structure> gets a resourceref
|
||||
attribute to reference it. If you set the stylesheet
|
||||
param 'root.as.resourceref' to zero, then the root element
|
||||
is handled differently, as described as follows.
|
||||
|
||||
If the structure element does not have a resourcref
|
||||
attribute, the root element is constructed rather
|
||||
than copied from a resource. The structure element must
|
||||
have a renderas attribute (or its child output element must
|
||||
have such) to select the output root element name.
|
||||
|
||||
Any content between the root element start tag and the
|
||||
first module is put into a resource with the original
|
||||
root element. To pull this content in, the first
|
||||
module in the structure points to this resource but
|
||||
uses a contentonly="yes" attribute. The effect of
|
||||
that attribute is to pull in all content *except*
|
||||
the root element of that resource.
|
||||
|
||||
In general, if you have content that does not logically
|
||||
have its own container element, you can put the content
|
||||
into a suitable container element and then deselect the
|
||||
container element upon assembly with the contentonly="yes"
|
||||
attribute. That attribute can also be used to avoid
|
||||
pulling in a resource's xml:id when you want to change it.
|
||||
|
||||
|
||||
To process an <assembly> into an assembled DocBook document
|
||||
==============================================================
|
||||
|
||||
To convert an <assembly> and its associated modular
|
||||
files into a single DocBook document, process
|
||||
your assembly document with the assemble.xsl stylesheet.
|
||||
You should then be able to process the resulting
|
||||
document with a DocBook XSL formatting stylesheet.
|
||||
|
||||
|
||||
|
||||
|
||||
Useful params in assemble.xsl
|
||||
-----------------------------
|
||||
The $root.default.renderas param sets the name of the
|
||||
root element of the assembled document, if it is not
|
||||
otherwise specified with @renderas. Its default value
|
||||
is 'book'.
|
||||
|
||||
The $topic.default.renderas param sets the name of the
|
||||
output element for any topic element included in the
|
||||
assembly, if it is not otherwise specified with
|
||||
@renderas. It's default value is 'section'.
|
||||
|
||||
The $structure.id param lets you specify at runtime
|
||||
the id value of the structure you want to reassemble.
|
||||
This is only necessary if you have more than one
|
||||
structure element in your assembly.
|
||||
|
||||
The $output.type param also lets you specify at runtime
|
||||
which structure element to process. In this case,
|
||||
the value should match on an @type attribute on
|
||||
the structure element.
|
||||
|
||||
The $output.format param lets you specify at runtime
|
||||
which of several possible output formats are being generated.
|
||||
The param value is compared to the @format
|
||||
attribute on <output> elements to select specific properties
|
||||
for a module.
|
||||
|
||||
|
||||
|
||||
Unsupported Features
|
||||
-----------------------
|
||||
|
||||
The transforms and transform elements are currently ignored
|
||||
by the assembly stylesheet.
|
||||
|
||||
The relationships and relationship elements are currently
|
||||
ignored by the assembly stylesheet.
|
||||
|
||||
The filterin and filterout elements are not currently
|
||||
supported.
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,221 +0,0 @@
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:exsl="http://exslt.org/common"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://docbook.org/ns/docbook"
|
||||
version="1.0"
|
||||
exclude-result-prefixes="exsl">
|
||||
|
||||
<!-- ********************************************************************
|
||||
$Id: topic-maker-chunk.xsl,v 1.7 2012-04-16 00:29:35 bobs Exp $
|
||||
********************************************************************
|
||||
-->
|
||||
|
||||
<xsl:import href="topic-maker.xsl"/>
|
||||
|
||||
<xsl:import href="../xhtml/chunk-common.xsl"/>
|
||||
|
||||
<xsl:include href="../xhtml/chunk-code.xsl"/>
|
||||
|
||||
<xsl:param name="root.id.suffix">-info</xsl:param>
|
||||
<xsl:param name="root.as.resourceref" select="1"/>
|
||||
|
||||
<xsl:template match="/" priority="1">
|
||||
<xsl:apply-templates select="/" mode="process.root"/>
|
||||
|
||||
<xsl:call-template name="make.assembly"/>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="chunk-element-content">
|
||||
<xsl:param name="content">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:copy-of select="$content"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="make.assembly">
|
||||
<xsl:variable name="content">
|
||||
<assembly xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<xsl:call-template name="make.resources"/>
|
||||
<xsl:call-template name="make.structure"/>
|
||||
</assembly>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="filename">
|
||||
<xsl:if test="$manifest.in.base.dir != 0">
|
||||
<xsl:value-of select="$base.dir"/>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="$assembly.filename"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="write.chunk">
|
||||
<xsl:with-param name="content" select="$content"/>
|
||||
<xsl:with-param name="filename" select="$filename"/>
|
||||
<xsl:with-param name="indent">yes</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="make.structure">
|
||||
<xsl:param name="root" select="/*[1]"/>
|
||||
|
||||
<xsl:param name="root.resourceref">
|
||||
<xsl:call-template name="object.id">
|
||||
<xsl:with-param name="object" select="$root"/>
|
||||
</xsl:call-template>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$root.as.resourceref = 0">
|
||||
<structure>
|
||||
<xsl:attribute name="type">
|
||||
<xsl:value-of select="local-name($root)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="xml:id">
|
||||
<xsl:value-of select="$root.resourceref"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:copy-of select="($root/title | $root/info/title)[1]"/>
|
||||
|
||||
<!-- Put the title and info stuff in a content-only module -->
|
||||
<module resourceref="{$root.resourceref}{$root.id.suffix}" contentonly="true"/>
|
||||
<xsl:apply-templates select="$root/*" mode="module.list"/>
|
||||
</structure>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<structure>
|
||||
<xsl:attribute name="resourceref">
|
||||
<xsl:value-of select="$root.resourceref"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<output renderas="{local-name($root)}"/>
|
||||
|
||||
<xsl:apply-templates select="$root/*" mode="module.list"/>
|
||||
</structure>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*" mode="module.list">
|
||||
<xsl:variable name="is.chunk">
|
||||
<xsl:call-template name="chunk">
|
||||
<xsl:with-param name="node" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- generate an output element for renderas? -->
|
||||
<xsl:variable name="src.element" select="concat(' ', local-name(.), ' ')"/>
|
||||
|
||||
<xsl:variable name="is.topic">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($topic.list, $src.element)">1</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$is.chunk = 1">
|
||||
<module>
|
||||
<xsl:attribute name="resourceref">
|
||||
<xsl:call-template name="object.id"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:if test="$is.topic = 1">
|
||||
<output renderas="{local-name()}"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:apply-templates select="*" mode="module.list"/>
|
||||
</module>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="make.resources">
|
||||
<resources>
|
||||
<!-- Add xml:base from $base.dir if manifest not in base.dir -->
|
||||
<xsl:if test="string-length($base.dir) != 0 and
|
||||
$manifest.in.base.dir = 0">
|
||||
<xsl:attribute name="xml:base">
|
||||
<!-- strip off trailing slash for xml:base -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring($base.dir, string-length($base.dir),1) = '/'">
|
||||
<xsl:value-of select="substring($base.dir, 1, string-length($base.dir) -1)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$base.dir"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="/*[1]" mode="resource.list"/>
|
||||
</resources>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*" mode="resource.list">
|
||||
<xsl:variable name="is.chunk">
|
||||
<xsl:call-template name="chunk">
|
||||
<xsl:with-param name="node" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$is.chunk = 1">
|
||||
<resource>
|
||||
<xsl:attribute name="fileref">
|
||||
<!--
|
||||
<xsl:if test="$manifest.in.base.dir = 0">
|
||||
<xsl:value-of select="$base.dir"/>
|
||||
</xsl:if>
|
||||
-->
|
||||
<xsl:apply-templates select="." mode="chunk-filename"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:attribute name="xml:id">
|
||||
<xsl:call-template name="object.id"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:variable name="title">
|
||||
<xsl:apply-templates select="." mode="title.markup"/>
|
||||
</xsl:variable>
|
||||
<xsl:if test="string-length($title) != 0">
|
||||
<description>
|
||||
<xsl:value-of select="$title"/>
|
||||
</description>
|
||||
</xsl:if>
|
||||
|
||||
</resource>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:apply-templates select="*" mode="resource.list"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- special case for root id on structure element -->
|
||||
<xsl:template match="/*" mode="resource.list">
|
||||
<xsl:param name="root.resourceref">
|
||||
<xsl:call-template name="object.id">
|
||||
<xsl:with-param name="object" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:param>
|
||||
|
||||
<resource>
|
||||
<xsl:attribute name="fileref">
|
||||
<xsl:apply-templates select="." mode="chunk-filename"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="xml:id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$root.as.resourceref = 0">
|
||||
<xsl:value-of select="concat($root.resourceref,$root.id.suffix)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$root.resourceref"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
</resource>
|
||||
<xsl:apply-templates select="*" mode="resource.list"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- This one must be here because of the template in chunk-code.xsl -->
|
||||
<xsl:template match="@fileref" priority="1">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user