Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorkild U. Resheim2013-05-27 19:20:02 +0000
committerTorkild U. Resheim2013-05-27 19:28:08 +0000
commitc8a9a32029921f67b20f67aead26f2bee6f95ba9 (patch)
tree0aef63a6fbe7d119935d73c78f3d626004acd62f
parentb67eda69c50dec660082dd9414fe5131b7e3feba (diff)
downloadorg.eclipse.mylyn.docs-c8a9a32029921f67b20f67aead26f2bee6f95ba9.tar.gz
org.eclipse.mylyn.docs-c8a9a32029921f67b20f67aead26f2bee6f95ba9.tar.xz
org.eclipse.mylyn.docs-c8a9a32029921f67b20f67aead26f2bee6f95ba9.zip
409201: Fix reference title should not have to be set.
-rw-r--r--org.eclipse.mylyn.docs.epub.core/src/org/eclipse/mylyn/docs/epub/core/OPSPublication.java11
-rw-r--r--org.eclipse.mylyn.docs.epub.help/docs/epub-ant-task.textile21
2 files changed, 16 insertions, 16 deletions
diff --git a/org.eclipse.mylyn.docs.epub.core/src/org/eclipse/mylyn/docs/epub/core/OPSPublication.java b/org.eclipse.mylyn.docs.epub.core/src/org/eclipse/mylyn/docs/epub/core/OPSPublication.java
index ea31006dc..930c12f9e 100644
--- a/org.eclipse.mylyn.docs.epub.core/src/org/eclipse/mylyn/docs/epub/core/OPSPublication.java
+++ b/org.eclipse.mylyn.docs.epub.core/src/org/eclipse/mylyn/docs/epub/core/OPSPublication.java
@@ -549,7 +549,7 @@ public abstract class OPSPublication {
* @param href
* the item referenced
* @param title
- * title of the reference
+ * title of the reference (optional)
* @param value
* type of the reference
* @return the reference
@@ -561,9 +561,6 @@ public abstract class OPSPublication {
if (href == null) {
throw new IllegalArgumentException("A href must be specified"); //$NON-NLS-1$
}
- if (title == null) {
- throw new IllegalArgumentException("A title must be specified"); //$NON-NLS-1$
- }
log(MessageFormat.format(Messages.getString("OPSPublication.11"), value, title, href), Severity.VERBOSE, //$NON-NLS-1$
indent);
Reference reference = OPFFactory.eINSTANCE.createReference();
@@ -872,7 +869,11 @@ public abstract class OPSPublication {
}
}
if (add) {
- addItem(null, null, file, relativePath.getParent(), null, false, false, false);
+ try {
+ addItem(null, null, file, relativePath.getParent(), null, false, false, false);
+ } catch (Exception e) {
+ throw new RuntimeException("Could not add file referenced from \"" + root + "\"", e);
+ }
}
}
}
diff --git a/org.eclipse.mylyn.docs.epub.help/docs/epub-ant-task.textile b/org.eclipse.mylyn.docs.epub.help/docs/epub-ant-task.textile
index 5b561ac80..0e021b3ff 100644
--- a/org.eclipse.mylyn.docs.epub.help/docs/epub-ant-task.textile
+++ b/org.eclipse.mylyn.docs.epub.help/docs/epub-ant-task.textile
@@ -14,7 +14,7 @@ bc..
id ID #IMPLIED
taskname CDATA #IMPLIED
identifierid CDATA #IMPLIED
- file CDATA #IMPLIED
+ file CDATA #REQUIRED
description CDATA #IMPLIED
workingfolder CDATA #IMPLIED
includeReferenced %boolean; #IMPLIED>
@@ -115,7 +115,7 @@ bc..
<!ATTLIST contributor
id ID #IMPLIED
fileAs CDATA #IMPLIED
- name CDATA #IMPLIED
+ name CDATA #REQUIRED
lang CDATA #IMPLIED
role CDATA #IMPLIED>
@@ -123,7 +123,7 @@ bc..
<!ATTLIST creator
id ID #IMPLIED
fileAs CDATA #IMPLIED
- name CDATA #IMPLIED
+ name CDATA #REQUIRED
lang CDATA #IMPLIED
role CDATA #IMPLIED>
@@ -164,7 +164,7 @@ bc..
<!ELEMENT date EMPTY>
<!ATTLIST date
id ID #IMPLIED
- date CDATA #IMPLIED
+ date CDATA #REQUIRED
event CDATA #IMPLIED>
p.
@@ -259,9 +259,9 @@ h3. Cover
bc..
<!ELEMENT cover (#PCDATA)>
<!ATTLIST cover
- image CDATA #IMPLIED>
+ image CDATA #REQUIRED>
-p. Adds a cover page using the supplied image file. Use a PNG, SVG or JPEG formatted file. When supplying raster images a dimension of 738x985 pixels is typical for a full screen iPad image. A title can also be specified.
+p. Adds a cover page using the supplied image file. Use a PNG, SVG or JPEG formatted file. When supplying raster images a dimension of 738x985 pixels is typical for a full screen iPad image. A title can also be specified as text within the "cover" delimiters.
h2. Adding content
@@ -275,15 +275,14 @@ bc..
<!ELEMENT item EMPTY>
<!ATTLIST item
id ID #IMPLIED
- file CDATA #IMPLIED
+ file CDATA #REQUIRED
type CDATA #IMPLIED
- page CDATA #IMPLIED
spine %boolean; #IMPLIED>
p.
* **file** - points to a file to include in the manifest
* **type** - The MIME type of the file. If omitted it will be automatically detected if possible.
-* **spine** - Whether or not to include the file in the reading order of the publication.
+* **spine** - Whether or not to include the file in the reading order of the publication. The default is *true*.
h3. Secondary content files
@@ -309,8 +308,8 @@ bc..
<!ELEMENT reference EMPTY>
<!ATTLIST reference
id ID #IMPLIED
- href CDATA #IMPLIED
- type CDATA #IMPLIED
+ href CDATA #REQUIRED
+ type CDATA #REQUIRED
title CDATA #IMPLIED>
p.
* **id** - optional unique identifier.

Back to the top