-
Notifications
You must be signed in to change notification settings - Fork 1
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
Replace XSD string type with more appropriate NCName for VariableId, RuleId and ParameterName #42
Comments
That makes sense. Thoughts on ramifications to JSON? NCName seems more restrictive than JSON strings so do we specify lowest common denominator for data types…? |
For the JSON variant, we can translate NCName to a JSON string type with a pattern as follows in JSON schema (more info): { "type": "string", "pattern": "^[_A-Za-z][-._A-Za-z0-9]*$"} The pattern value is the regular expression for a NCName according to the definition in the Schema for Datatype Definitions from the XML Schema standard: ...
<xs:simpleType name="NCName" id="NCName">
...
<xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern">
...
</xs:simpleType>
...
|
This makes sense.** Perhaps we should consider general lexicon of regex definitions that apply to corresponding XML/JSON schema datatypes? **I think we may want to tighten this one up a bit. It matches things like "-------------------" |
I think your link is wrong, it shows another regex. |
Sorry, a typo. It matches “a------------” |
In XACML 3.0, the
xs:string
type is used for the VariableId (in VariableDefinition), RuleId (in Rule) and ParameterName (in CombinerParameter) attributes, which means any XML text can be used as variable ID, rule ID or parameter name, including bad things like an empty string""
or a string starting/ending with whitespace(s), or a string filled with whitespaces, or even worse a string containing multiple lines with line breaks!NCName (or Name) type is usually more appropriate for this.
The text was updated successfully, but these errors were encountered: