Re: [netmod] Must expression: how to test all instances?

2022-09-07 Thread Kent Watsen
[CC-ing NETCONF WG]

True.  I added those 'must' expressions without error-messages.  Error-messages 
can often times be used to decipher 'must' expressions to a human-readable 
form.  Should we add now?  (Note: the drafts are post-LC in the NETCONF WG)

Would anyone be willing to submit a Pull Request to added "error-message" 
statements for these 'must' expressions?  The repos are here:
https://github.com/netconf-wg/ssh-client-server
https://github.com/netconf-wg/tls-client-server
K. // author


> On Sep 2, 2022, at 8:40 AM, Sterne, Jason (Nokia - CA/Ottawa) 
>  wrote:
> 
> Hi all,
> Not many people are going to understand a must statement like that. Maybe a 
> good idea to also describe this constraint in a description statement 
> somewhere in the model ? 
> Jason
> 
>> -Original Message-
>> From: netmod  On Behalf Of Kent Watsen
>> Sent: Tuesday, August 23, 2022 9:32 PM
>> To: Jernej Tuljak 
>> Cc: netmod@ietf.org
>> Subject: Re: [netmod] Must expression: how to test all instances?
>> 
>> Hi Jernej,
>> 
>>> Lada's second example selects everything that does not match a condition
>> then states such a selection should return nothing:
>>> 
>>> not(deref(.)/../ts:public-key/ts:public-key-format[not(derived-from-or-self(.,
>> "ct:ssh-public-key-format"))])
>> 
>> It works - thank-you!  :)
>> 
>> 
>>> Check if the corner cases work out for your needs, however. Returns true() 
>>> for
>> an empty list, for example.
>> 
>> When the lists are empty, the validation succeeds, which seems correct in 
>> this
>> context.
>> 
>> 
>>> Jernej
>> 
>> Kent
>> 
>> ___
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] https? - Regex

2022-09-07 Thread Carsten Bormann
On 7. Sep 2022, at 12:28, tom petch  wrote:
> 
> I do note that in 
> [3]   piece   ::=   atom quantifier?
> the meaning of the question mark is different else it would allow
> [3]   piece   ::=   atom quantifie
> Sigh.

Indeed.  XSD regexes are not defined via regexes, but via an EBNF that W3C 
chose for this [1].

Grüße, Carsten

[1]: https://www.w3.org/TR/xml/#sec-notation

Note that this form of EBNF includes a regexp-like form of character class 
notation, but does not mirror the dense syntax of regexps overall.

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] https? - Regex

2022-09-07 Thread tom petch
From: William Lupton 
Sent: 07 September 2022 11:11

I think that the most relevant bits are:

[3]   piece   ::=   atom quantifier?
[9]   atom   ::=   Char | charClass | ( '(' regExp ')' )
[4]   quantifier   ::=   [?*+] | ( '{' quantity '}' )

In https? we have five pieces, of which only the last has a quantifier

So https? means h, t, t, p, optional-s

If you want the '?' to apply to more, then you need parentheses, e.g., (https)?.




Thank you for that.  I was wrong!

I do note that in 
[3]   piece   ::=   atom quantifier?
 the meaning of the question mark is different else it would allow
[3]   piece   ::=   atom quantifie
Sigh.

Tom Petch


On Wed, 7 Sept 2022 at 10:29, tom petch 
mailto:ie...@btconnect.com>> wrote:
I commented recently on a draft that said that a regex of
https?
would match http which I said it would not.  The author said that he had tested 
it ok so I turned to XML Schema Part 2 as referenced by RFC7950 which tells me 
that
S?   the empty string, and all strings in L(S)
where L(S) is not explained and my set theory is too rusty to help.

Can anyone confirm for me that I am wrong, and that the Author is right?

Tom Petch
___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] https? - Regex

2022-09-07 Thread William Lupton
I think that the most relevant bits are:

[3]   piece   ::=   atom quantifier?
[9]   atom   ::=   Char | charClass | ( '(' regExp ')' )
[4]   quantifier   ::=   [?*+] | ( '{' quantity '}' )

In https? we have five pieces, of which only the last has a quantifier

So https? means h, t, t, p, optional-s

If you want the '?' to apply to more, then you need parentheses, e.g.,
(https)?.

On Wed, 7 Sept 2022 at 10:29, tom petch  wrote:

> I commented recently on a draft that said that a regex of
> https?
> would match http which I said it would not.  The author said that he had
> tested it ok so I turned to XML Schema Part 2 as referenced by RFC7950
> which tells me that
> S?   the empty string, and all strings in L(S)
> where L(S) is not explained and my set theory is too rusty to help.
>
> Can anyone confirm for me that I am wrong, and that the Author is right?
>
> Tom Petch
> ___
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>
___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


[netmod] https? - Regex

2022-09-07 Thread tom petch
I commented recently on a draft that said that a regex of 
https?
would match http which I said it would not.  The author said that he had tested 
it ok so I turned to XML Schema Part 2 as referenced by RFC7950 which tells me 
that 
S?   the empty string, and all strings in L(S)
where L(S) is not explained and my set theory is too rusty to help.

Can anyone confirm for me that I am wrong, and that the Author is right?

Tom Petch
___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod