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

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

jonBitgood opened this issue Feb 3, 2020 · 6 comments
Labels
Milestone

Comments

@jonBitgood
Copy link
Contributor

@jonBitgood 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

This comment has been minimized.

Copy link
Contributor

@klassenjm klassenjm commented Feb 6, 2020

@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

This comment has been minimized.

Copy link
Contributor Author

@jonBitgood jonBitgood commented Feb 6, 2020

Sorry about that, I do actually mean char not para

@jonBitgood

This comment has been minimized.

Copy link
Contributor Author

@jonBitgood jonBitgood commented Feb 6, 2020

The specific use case is an additional morphological content for w

@klassenjm klassenjm added type-char and removed type-para labels Feb 6, 2020
@klassenjm

This comment has been minimized.

Copy link
Contributor

@klassenjm klassenjm commented Feb 6, 2020

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

This comment has been minimized.

Copy link
Contributor Author

@jonBitgood jonBitgood commented Feb 6, 2020

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

This comment has been minimized.

Copy link
Contributor

@klassenjm klassenjm commented Feb 6, 2020

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

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.