-
Notifications
You must be signed in to change notification settings - Fork 125
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
<html> element issue in XHTML document generation from an ODD file #683
Comments
Hmmm … some questions:
Years ago I defined a subset of HTML in ODD just to demonstrate generating a complete markup language in ODD. (I created a version of John Cowan’s cleverly named Itsy Bitsy Teeny Weeny Simple HyperText DTD, except, of course, I do not actually use the DTD, I use the RNG.) It does this by using an ODD that does have a |
@sydb This is a customization ODD which @daydin will post shortly. It's derived from lots of other examples I've had in projects for years, and we're seeing the same problem in all these projects. This is something which has recently happened in the Stylesheets, possibly only in dev (I use the bleeding-edge Oxygen plugin and I think @daydin does too). So I think this is a new regression which results from recent work in the Stylesheets. Adding |
Here is the ODD file itself. I had to rename the extension to pass it through GitHub's extension checker. |
This is interesting! Not sure what is going on here yet, but I can confirm that internal links to specification elements are broken in the processed.odd (at least when running |
Curiouser and curiouser — I just tested the same command ( I then tested the staticSearch.odd (since it's a similar kind of customization) and the produced HTML was valid in all cases. After some guessing and checking and comparing (e.g. adding <div class="specChild">
<span class="specChildModule">dniHtml: </span>
<span class="specChildElements">
<a class="link_odd_elementSpec" href="#TEI.meta" title="<meta>">meta</a>
<a class="link_odd_elementSpec" href="#TEI.title" title="<title>">title</a>
</span>
</div> (Though, it seems strange to me that the ids are all prefixed by "TEI" — I would have assumed they would have been prefixed by something like the ident or the prefix?) In any case, declaring the staticSearch namespace in the staticSearch.odd similarly creates broken links, so I think the namespace declaration is the problem (though I'm not sure why). |
@joeytakeda Good catch! Along with @daydin's discovery that I'm intrigued that this goes back as far as 7.54; it's possibly I haven't regenerated documentation for some of the older projects for that long, but it seems unlikely. The other possibility is that this has been caused by a recent change to p5subset.xml. |
I have another find. I did the transformation with Saxon 10 as follows:
|
Links to customizations no longer respected prefixes, so ensure those are there
Make sure all members of classSpecs also get their prefixes
@martindholmes — out of curiosity, do all of those ODDs also define the And thanks @daydin — The Saxon I used was the one bundled with the Stylesheets (which is also Saxon10HE), but I'm not sure how you were able to get the proper Lines 793 to 805 in 69faae1
However, I think the main issue derives from how prefixes are retrieved and the links are generated in the step before (e.g. in the odd2lite transformation). I've started working on this in a branch, but the tests aren't passing, so there's definitely some more investigation that needs to happen here. But what I've found so far is that, for the first issue (e.g. links that didn't resolve properly), the prefixes weren't being passed properly (see 2a58dd7); the HTML stylesheets in this case just bailed and didn't make the link. But for whatever reasons, references to elements as members of a class (e.g. the spec table for |
oh lol I've just named the output dni.html as I was expecting Saxon to produce an HTML and not another ODD file. My bad! |
@joeytakeda Yes, I always have the xh: prefix declared on the root TEI element. It's also declared using |
Hi all!
I've been working with an ODD file to generate documentation alongside my Relax NG schema. While the schema generates just fine, the resulting documentation (HTML format) seems to have validation errors of the following sort:
value of attribute "href" is invalid; must be a string matching the regular expression "[ -]*" or must be a URI
because some of the URLs have not been replaced. A sample broken URL replacement looks like this:
and I am defining the
<html>
element as below:I've found a workaround solution, which was to add
mode="change"
in the<html>
elementSpec. I don't really understand why this works though, unless there is a pre-existing<html>
definition hiding somewhere outside of my ODD file. I confirmed that my ODD file only has the one<html>
definition as I pasted above. Any insight is welcome!The text was updated successfully, but these errors were encountered: