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

User Defined Attributes throwing a error when using supplied RNG #41

Open
jonbitgood opened this issue Feb 3, 2020 · 6 comments
Open

Comments

@jonbitgood
Copy link
Contributor

jonbitgood commented Feb 3, 2020

When validating a usx 3.0 document with the RNG it can throw a error if the usx files contain elements that have user defined attributes.

Adding a universally allowed wildcard attribute using x-* would solve this if rnc allows allows wildcards.

element char {
    attribute x-* { text }
}
@klassenjm klassenjm added this to the 3.0.1 milestone Feb 6, 2020
@klassenjm
Copy link
Contributor

@jonbitgood You are suggesting support for user-defined attributed for paragraph types <para>. Currently USX documentation only indicates that user-defined attributes might be added to <char>.

I can see the benefit of supporting and validating additional user-defined attributes for either.

Could you show a sample of how you are using x- for a <para> ?

@jonbitgood
Copy link
Contributor Author

Sorry about that, I do actually mean char not para

@jonbitgood
Copy link
Contributor Author

The specific use case is an additional morphological content for w

@klassenjm
Copy link
Contributor

Jon - sadly, it doesn't look easy or obvious how to implement wildcards with Relaxng. I also looked at whether a namespace for attributes would be possible? I have not yet seen a way to do this -- which leaves my disappointed in rnc, rng right now, since we do need to support x-. I'll look into it more, as I can,. If you know more about the possibilities, please let me know.

@jonbitgood
Copy link
Contributor Author

you cannot specify in any schema language that a certain attribute which has a name starting with a certain prefix should be skipped from validation or validated in a certain way.
Radu Coravu

😞

What we might do is ignore validation of attributes for a new char style or for w

<optional>
    <zeroOrMore>
        <attribute>
            <anyName />
        </attribute>
    </zeroOrMore>
</optional>

@klassenjm
Copy link
Contributor

I'll try to get back to this soon, Jon. A colleague may have a suggestion for us, which I need to explore.

@klassenjm klassenjm modified the milestones: 3.0.1, 3.0.3 Dec 18, 2020
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