Stylesheets icon indicating copy to clipboard operation
Stylesheets copied to clipboard

Possible regression in ODD-to-XHTML

Open martindholmes opened this issue 9 years ago • 10 comments

I'm using the bleeding-edge version of the Oxygen plugin, and when I transform an ODD file to create XHTML documentation, customizations are being dropped from the process. For instance, when this appears in my ODD:

<elementSpec ident="figure" module="figures" mode="change">
  <attList>
    <attDef ident="type" mode="change" usage="req">
      <valList type="closed" mode="replace">
        <valItem ident="ornament">
          <gloss>An ornamental figure on the page.</gloss>
        </valItem>
        <valItem ident="rule">
          <gloss>A horizontal rule or line.</gloss>
        </valItem>
      </valList>
    </attDef>
  </attList>
</elementSpec>

the @type attribute is not modified in the output. However, when I run this ODD through OxGarage online, the resulting documentation DOES have the correct values. I suspect something must have changed in the stylesheets recently which has given rise to this, but I can't figure out what it is. I'd like to confirm, first of all, that someone else can reproduce the problem using the bleeding-edge oxygen plugin.

martindholmes avatar Jul 06 '16 21:07 martindholmes

I can confirm this. I think it affects only attributes like @type which are being locally redefined. Am working on simple test case.

lb42 avatar Jul 07 '16 08:07 lb42

Ha! This problem seems to have gone away again! In any case, the attached simple test file now works as expected. I am on oXygen 15.2, plugin 3.0.118

foo.txt

lb42 avatar Jul 14 '16 11:07 lb42

I'll test this later at work. I have version 5.0 of the add-on here; that's the release rather than the bleeding-edge one. You have the most recent version, according to Jenkins. We must fix the version numbers in the bleeding-edge one; it makes no sense for them to be at 3 and the release at 5.

martindholmes avatar Jul 14 '16 12:07 martindholmes

Curses, it still fails for me in the latest bleeding update (3.0.118, same as yours). Could you test with the attached file? It has the same elementSpec in it, and the resulting documentation doesn't include the @type valList. I'm on Oxygen 18.0, build 2016062718. Could you also check that the actual transformation is calling the correct stylesheet set? I've had situations in which an old transformation was configured to point directly at the hard-coded stylesheet location so when Oxygen updated and the location of the plugin changed, the transformation was still using the old stylesheets.

ise.odd.zip

martindholmes avatar Jul 14 '16 15:07 martindholmes

Does my test file work for you or not?

Yours misbehaves for me. As you said, the HTML spec for figure does not show the modified values for @type, though they are there in the RELAXNG. Similarly, the redefinition of @type for stage is taken note of in the RELAXNG but not in the HTML.

The ant script says: Executing: "/opt/Oxygen XML Editor 17/jre/bin/java" -Xmx256m -classpath "/opt/Oxygen XML Editor 17/tools/ant/lib/ant-launcher.jar" "-Dant.home=/opt/Oxygen XML Editor 17/tools/ant" org.apache.tools.ant.launch.Launcher -lib "/opt/Oxygen XML Editor 17/classes" -lib "/opt/Oxygen XML Editor 17/lib/oxygen.jar" -lib "/opt/Oxygen XML Editor 17/lib/oxygenAuthor.jar" -lib "/opt/Oxygen XML Editor 17/lib/oxygenDeveloper.jar" -lib "/opt/Oxygen XML Editor 17/lib/oxygenEclipse.jar" -lib "/opt/Oxygen XML Editor 17/lib/oxygenAuthorEclipse.jar" -lib "/opt/Oxygen XML Editor 17/lib/oxygenDeveloperEclipse.jar" -lib "/opt/Oxygen XML Editor 17/lib/resolver.jar" -lib "/opt/Oxygen XML Editor 17/lib/xercesImpl.jar" -lib "/opt/Oxygen XML Editor 17/lib/saxon9ee.jar" -lib "/opt/Oxygen XML Editor 17/lib/saxon.jar" -lib "/opt/Oxygen XML Editor 17/lib/xml-apis-ext.jar" -lib "/opt/Oxygen XML Editor 17/lib/log4j.jar" -lib "/opt/Oxygen XML Editor 17/lib/trang.jar" -f "/home/lou/.com.oxygenxml/extensions/v17.1/frameworks/http___teijenkins.hcmc.uvic.ca_job_oxygen_tei_stable_lastSuccessfulBuild_artifact_oxygen_tei_updateSite.oxygen/tei/xml/tei/stylesheet/rnc/build-to.xml" "-DinputFile=/home/lou/Desktop/ise.odd" "-DoutputFile=/home/lou/Desktop/out/ise.rnc" "-Dprofile=default" "-Dlang=en" "-Doxygenlib=/opt/Oxygen XML Editor 17/lib" "-DdefaultSource=file:/home/lou/.com.oxygenxml/extensions/v17.1/frameworks/http___teijenkins.hcmc.uvic.ca_job_oxygen_tei_stable_lastSuccessfulBuild_artifact_oxygen_tei_updateSite.oxygen/tei/xml/tei/odd/p5subset.xml" "-Dwebhelp.trial.license=no"

Buildfile: /home/lou/.com.oxygenxml/extensions/v17.1/frameworks/http___teijenkins.hcmc.uvic.ca_job_oxygen_tei_stable_lastSuccessfulBuild_artifact_oxygen_tei_updateSite.oxygen/tei/xml/tei/stylesheet/rnc/build-to.xml

go: [echo] Do ODD expand processing (schema ${selectedSchema}) [xslt] Processing /home/lou/Desktop/ise.odd to /home/lou/Desktop/ise.odd.processedodd [xslt] Loading stylesheet /home/lou/.com.oxygenxml/extensions/v17.1/frameworks/http___teijenkins.hcmc.uvic.ca_job_oxygen_tei_stable_lastSuccessfulBuild_artifact_oxygen_tei_updateSite.oxygen/tei/xml/tei/stylesheet/odds/odd2odd.xsl [echo] XSLT generate relaxng files [xslt] Processing /home/lou/Desktop/ise.odd.processedodd to /home/lou/Desktop/out/ise.rnc.rng [xslt] Loading stylesheet /home/lou/.com.oxygenxml/extensions/v17.1/frameworks/http___teijenkins.hcmc.uvic.ca_job_oxygen_tei_stable_lastSuccessfulBuild_artifact_oxygen_tei_updateSite.oxygen/tei/xml/tei/stylesheet/profiles/default/relaxng/to.xsl [echo] TRANG generate RNC from RELAXNG files [delete] Deleting: /home/lou/Desktop/out/ise.rnc.rng

oddcleanup: [delete] Deleting: /home/lou/Desktop/ise.odd.processedodd

dist:

BUILD SUCCESSFUL Total time: 4 seconds

The process finished with exit code: 0

lb42 avatar Jul 14 '16 18:07 lb42

The output from your Oxygen suggests that you're not using the bleeding edge thing; you're using the stable (http___teijenkins.hcmc.uvic.ca_job_oxygen_tei_stable_lastSuccessfulBuild_artifact_oxygen_tei_updateSite.oxygen/tei/xml/tei/stylesheet...)

But your file works for me; so the next stage is to figure out what the differences are between the files. The only difference I can see is that I specify the @module on the <elementSpec>. Adding that to your file doesn't break it. I didn't have @start on <schemaSpec>, but adding that doesn't help. Can you see any differences that might cause the problem?

martindholmes avatar Jul 14 '16 18:07 martindholmes

I've FINALLY figured out what the difference is between the files. If you add these xml-models to your file:

<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_odds.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_odds.rng" type="application/xml"
    schematypens="http://purl.oclc.org/dsdl/schematron"?>

it will break in the same way mine does; and if you remove them from mine, it will work properly.

What does the transformation know or care about the schemas? That's ass-backwards, surely. I can't even imagine how this is making a difference.

martindholmes avatar Jul 14 '16 20:07 martindholmes

Actually it's even weirder than that. If you remove ONE of those xml-model PIs from your file, it will work!

lb42 avatar Jul 14 '16 21:07 lb42

Either of them, or just one in particular?

martindholmes avatar Jul 14 '16 21:07 martindholmes

Well, I only tried one. But they are identical, I think. OTOH, putting both of them into my file didnt cause it to fail, presumably because I was facing Mecca at the time. Going to bed now, after exciting Parisian fireworks display on telly.

lb42 avatar Jul 14 '16 21:07 lb42