New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"An empty sequence is not allowed" XSLT error [DITA OT 2.2.2 and older] #2212
Comments
But probably the problem resides in the code which rewrites the table colspecs, the initial columns named "c1", "c2"... seem to be rewritten as "col1", "col2".. but not everywhere. The table in the example is probably not valid according to the specs but it's very hard to detect the problem from the error message. |
For the same sample the PDF generation complains with:
|
Another example of invalid CALS table which breaks the XHTML generation:
but this one works in the PDF output. |
Does this occur with |
I can still reproduce the problem with both samples when publishing to XHTML, the error is at an identical location for both cases:
|
I can also reproduce the issue. I guess the problem is really that both of these examples are really content issues. I at least don't really know how the incongruous colspec names in the first tables should be interpreted. The second table has the wrong I suppose the The shortcut is to make DITA-OT ignore errors like these like this (I think this has been proposed as a solution in other related issues, as well): diff --git a/src/main/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl b/src/main/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl
index d7b47b9..438806e 100644
--- a/src/main/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl
+++ b/src/main/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl
@@ -2091,7 +2091,7 @@
<xsl:variable name="row" select=".." as="element()"/>
<xsl:variable name="body" select="../.." as="element()"/>
<xsl:variable name="group" select="../../.." as="element()"/>
- <xsl:variable name="colspec" select="../../../*[contains(@class, ' topic/colspec ')][@colname and @colname = $this-colname]" as="element()"/>
+ <xsl:variable name="colspec" select="../../../*[contains(@class, ' topic/colspec ')][@colname and @colname = $this-colname]" as="element()?"/>
<xsl:variable name="table" select="../../../.." as="element()"/>
<xsl:variable name="framevalue"> |
@eerohele I agree with everything, actually in Oxygen XML Editor 18.0 we'll have table layout validation done automatically as the user is editing each topic. Also agree with fixing the XSLT stylesheets to make the publishing succeed. Because XSLT errors like the ones reported now "An empty sequence is not allowed...." don't help anyone and the same samples worked with DITA OT 1.8. Indeed some proper table validation done in a certain stage of the DITA OT processing could be interesting (although it should probably be done on DOM and not SAX) but it's something not very easy to do. |
By the way, for the first example the PDF processing also fails at:
|
Related to this, I'm actually not sure if we want to have the column name normalization code. Since the transtype specific code should not rely on the column names to be the source of which column index the column is part of. Thus, I would prefer to keep the column names the same as before and then just use the custom attributes to provide additional information to make transtype processing easier. |
This one's tagged as 2.2.3 but was not fixed there - removing the tag. |
(But didn't mean to close it, hit the wrong button.) |
The just-closed issue #1715 is another instance of bad CALS markup ( |
Thanks. Solved the issue after much head scratching. I will propagate out to our team. One small thing, in OT 2.2, line number is 2108. |
The output might not be as expected because the table markup is invalid, but the processing will not be halted by an exception during XSLT conversion.
Signed-off-by: Roger Sheen <roger@infotexture.net>
* hotfix/2.4.6: Push extended description to `args.gen.task.lbl` Combine info on dita-ot/dita-ot#2651 & #2212 Fix docs milestone link Add info on dita-ot/dita-ot#2650 to 2.4.6 RN Add info on dita-ot/dita-ot#2549 to 2.4.6 RN Add info on dita-ot/dita-ot#2212 to 2.4.6 RN Add preliminary issue list to 2.4.6 Release Notes Bump 'maintenance-version' key to “2.4.6”
* hotfix/2.4.6: Push extended description to `args.gen.task.lbl` Combine info on dita-ot/dita-ot#2651 & #2212 Fix docs milestone link Add info on dita-ot/dita-ot#2650 to 2.4.6 RN Add info on dita-ot/dita-ot#2549 to 2.4.6 RN Add info on dita-ot/dita-ot#2212 to 2.4.6 RN Add preliminary issue list to 2.4.6 Release Notes Bump 'maintenance-version' key to “2.4.6” Remove obsolete unreferenced files Fix typo in closing target tag (#140) Use latest DITA-OT version (2.4.5) for CI builds
There is also this problem when two cells overlap on the same row:
and the publishing breaks with an error like:
which could either be more precise, have a better message or we could relax the checks. |
Can this repair be retrofitted to OT 2.3.1? Stuck on that version for the time being. |
In my DITA topic I have a CALS table like this:
and I publish to XHTML. The publishing breaks with:
The text was updated successfully, but these errors were encountered: