If you want the infoset to contain dfdl-wg@ogf.org, but also to contain localPart and domain, then you are putting the same data into multiple
fields, which can only be accomplished using inputValueCalc.

I suggest parse the data into localPart and domain by using the @ as terminator for localPart, and whatever the boundary is for the domain.

then have another element which you inputValueCalc which contains the concatenation of those fields with an '@' in the middle.

I choose this way, parse the pieces, compute the concatenation of them, versus the other way round because the expression for the inputValueCalc will be dead simple in this case, and you will get an ordinary error of 'delimiter not found' if the @ is missing from the data.

Contrast if you had one field which contains the whole email address and two calculated elements which take substrings of that. Now you have two inputValueCalc's. And if the @ isn't there in the string, you'll get errors evaluating expressions, not ordinary parsing, etc.

On Fri, Feb 22, 2013 at 11:11 AM, Garriss Jr., James P. <jgarriss@mitre.org> wrote:

Suppose I want to model an email address:

 

  dfdl-wg@ogf.org

 

It’s a sequence of a string, an a character (@), and a string.

 

In the MBTK it might look like this:

 

 

The problem, of course, is that the parser will grab all of “dfdl-wg@ogf.org” instead of just “dfdl-wg”.  Setting validation facets doesn’t help, b/c validation happens after parsing.  Setting @ as a separator or terminator would work, but that doesn’t seem right either, as the @ is part of the email address, and I would want to keep it in the infoset.

 

How do I think about this problem?

 

TIA


--
  dfdl-wg mailing list
  dfdl-wg@ogf.org
  https://www.ogf.org/mailman/listinfo/dfdl-wg



--
Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com