- From: Jason Douglas <jasondouglas@google.com>
- Date: Thu, 16 Oct 2014 21:05:43 +0000
- To: Jeremy Lucas <jerluc@urx.com>, public-vocabs@w3.org
- Message-ID: <CAEiKvUAZOT54bUm9WHsjX_PEQAwMdoyBedmC5ikOQ7t7LfuETA@mail.gmail.com>
Hmm... I thought this had been removed.
> The allowed references in the templates for substitution are dotted
schema paths to the filled-in properties (relative to the Action object).
You're right, there isn't a standard way to do those paths, so we reverted
to HTML input-like naming. So I'd expect the following for your example:
{
"@context": "http://schema.org",
"@type": "TravelAction",
"target": "http://mysite.com/travel?from={from}&to={to}
<http://mysite.com/travel?from=%7Bfrom.address.streetAddress%7D&to=%7Bto.address.streetAddress%7D>
",
"fromLocation": {
"address" : {
"StreetAddress-input" : "required name=from"
}
},
"toLocation": {
"address" : {
"StreetAddress-input" : "required name=to"
}
}
}
On Wed Oct 15 2014 at 3:04:08 AM Jeremy Lucas <jerluc@urx.com> wrote:
> I'm trying to figure out the correct way to implement potentialAction
> input constraints (with a templated target URI) for an Action that requires
> a complex value as input. Currently, I'm referencing this
> <http://schema.org/docs/actions.html> documentation.
>
> As an example of what I'm asking, let's say I have two schema.org Place
> objects (one representing a source location, the other representing a
> destination location). How do I then construct a potentialAction (namely, a
> TravelAction) that can be interpolated using these two Place objects as
> input?
>
> I was hoping that RFC6570 <http://www.rfcreader.com/#rfc6570> would have
> some kind of syntactic allowance for "dot-notation" in order to traverse
> complex values such as:
>
> {
> "@context": "http://schema.org",
> "@type": "TravelAction",
> "target": "
> http://mysite.com/travel?from={from.address.streetAddress}&to={to.address.streetAddress}
> ",
> "fromLocation-input": "required name=from"
> "toLocation-input": "required name=to"
> }
>
> But per the RFC, there is no such thing presently specified.
>
> However, I have noted the following quote from the relevant Schema.org
> documentation regarding the URI templating with Actions:
>
> > The allowed references in the templates for substitution are dotted
> schema paths to the filled-in properties (relative to the Action object).
>
> The above quote very much so sounds like there actually is some proposed
> method for interpolating values nested within complex objects.
>
> Can anyone verify my assumptions? Or are is there some other sane way of
> expressing this kind of input constraint for a given Action?
>
> Thanks for any info
> --
> -jerluc
>
Received on Thursday, 16 October 2014 21:06:15 UTC