Skip to content
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

Handle rng:notAllowed in constraint modules #17

Open
drmacro opened this issue Aug 23, 2018 · 1 comment
Open

Handle rng:notAllowed in constraint modules #17

drmacro opened this issue Aug 23, 2018 · 1 comment
Assignees

Comments

@drmacro
Copy link
Contributor

drmacro commented Aug 23, 2018

The 1.3 spec shows this example for defining a constraint:

<div>
<a:documentation>MODULE INCLUSIONS</a:documentation>
<include href="topicMod.rng"/>
<include href="hazardstatementDomainMod.rng"/>
<include href="highlightDomainMod.rng">
<ditaarch:domainsContribution
>(topic hi-d-noUnderline-c)</ditaarch:domainsContribution>
<define name="u">
<notAllowed></notAllowed>
</define>
</include>
<include href="indexingDomainMod.rng"/>
<include href="utilitiesDomainMod.rng"/>
</div>

With the intent being that the notAllows for the u element removes it from any content models it's part of.

Need to implement this processing so that notAllowed patterns are removed from any context where they are referenced.

This requires ensuring that the resulting parameter entity or model group is valid. For example, if all members of a group are removed, the group itself must be removed. If a parameter entity ends up being empty, then references to the parameter entity must be removed in contexts where a reference too an empty parameter entity is not allowed (i.e., content models).

@drmacro drmacro added this to the Full constraint suppoort milestone Aug 23, 2018
@drmacro drmacro self-assigned this Aug 23, 2018
@lief-erickson
Copy link

@drmacro, I've been attempting to use this project. It works to convert RNG to DTD & XSD for basic shells and topic specializations, although I did have to workaround a $resultUri issue in rng2ditadtd.xsl. What's the status of the constraint support?

When I attempt to convert /test/topicmod-constraint, I get this error:

     [java] Type error at char 22 in xsl:variable/@select on line 110 column 7 of rng2catalogs.xsl:
     [java]   XTTE0570: Required item type of value of variable $rngDocs is document-node(); supplied
     [java]   value has item type xs:base64Binary
     [java]   at xsl:call-template name="generateCatalog" (file:/D:/dita-rng-converter/xsl/rng2catalogs/rng2catalogs.xsl#123)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants