W3C home > Mailing lists > Public > public-rdfa@w3.org > March 2014

Re: how do I copy some properties that are part of a bigger pattern

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Sat, 8 Mar 2014 17:33:29 -0700
Cc: public-rdfa@w3.org
Message-Id: <4DAFBFE3-4714-4C89-A08E-CDF288B07342@greggkellogg.net>
To: Jarno van Driel <jarnovandriel@gmail.com>
Hi Jarno, I donít think you can do precicely what you want, since if a pattern is included in another pattern, the @resource attributes get in the way. You can do it by adding some more rdfa:copy properties. This is what I came up with:

<body vocab="http://schema.org/" resource="#item-page" typeof="ItemPage">
  <link property="rdfa:copy" href="#copyright-holder">

  <article property="text">
    <div resource="#article" typeof="Article">
      <div property="publisher" typeof="Corporation">
        <link property="rdfa:copy" href="#publisher-url"/>
        <link property="rdfa:copy" href="#publisher-description"/>
      </div>


      <h1 property="Name">How to copy properties in RDFa Lite &amp; Microdata</h1>
    </div>
  </article>

  <footer property="mentions" typeof="WPFooter">
    <div property="text">
      <p resource="#copyright-holder" typeof="rdfa:Pattern">
        <span property="copyrightHolder" typeof="Corporation">
          <link property="rdfa:copy" href="#publisher-url"/>
          <link property="rdfa:copy" href="#publisher-description"/>
          <span resource="#publisher-url" typeof="rdfa:Pattern">
            <a id="publisher-url" property="url" href="http://www.example.org" title>
              <span property="name">Corporation name</span>
            </a>
          </span>

          <span resource="#publisher-description" typeof="rdfa:Pattern">
            <span id="publisher-description" property="description">Corporation description</span>
          </span>
        </span>
      </p>
    </div>
  </footer>
</body>

Gregg Kellogg
gregg@greggkellogg.net

On Mar 8, 2014, at 2:37 PM, Jarno van Driel <jarnovandriel@gmail.com> wrote:

> <body vocab="http://schema.org/" resource="#item-page" typeof="ItemPage">
> 	<link property="rdfa:copy" href="#copyright-holder">
> 
> 	<article property="text">
> 		<div resource="#article" typeof="Article">
> 			<link property="publisher" typeof="Corporation" href=?????>
> 
> 
> 			<h1 property="Name">How to copy properties in RDFa Lite & Microdata</h1>
> 		</div>
> 	</article>
> 
> 	<footer property="mentions" typeof="WPFooter">
> 		<div property="text">
> 			<p resource="#copyright-holder" typeof="rdfa:Pattern">
> 				<span property="copyrightHolder" typeof="Corporation">
> 					<a id="publisher-url" property="url" href="http://www.example.org" title>
> 						<span property="name">Corporation name</span>
> 					</a>
> 
> 					<span id="publisher-description" property="description">Corporation description</span>
> 				</span>
> 			</p>
> 		</div>
> 	</footer>
> </body>
> 


Received on Sunday, 9 March 2014 00:34:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:52 UTC