Reputation: 60413
Im trying to create some custom blocks for a CMS interface based on the symfony-cmf. In order for these blocks to be edited inline with createphp/hallo i need to create RDFa mappings for them.
The basic example for an included block is something like the following:
<type
xmlns:sioc="http://rdfs.org/sioc/ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
typeof="sioc:Post"
>
<attribute key="class" value="articleContainer span3"/>
<children>
<property property="dcterms:title" identifier="title" tag-name="h2"/>
<property property="sioc:content" identifier="content" />
</children>
</type>
Which would yield something like this:
<h2>The title input</h2>
<p>the content, however i beleive the actual <p> tag is applied by the editor</p>
Thats all well and good... What Im having a hard time figuring out how to define this mapping for a resource that will be something like this:
<h1>Text string with <strong>emphasized phrase</strong> in the middle</h1>
I could probably just use the sioc:content
type and then rely on the user to "bold" the emphasized phrase in the editor but i would rather have it be edited explicitly.
Is there a way to do this? Also if anyone could point me towards solid RDFa tutorials that would be great. My google-fu is usually strong but all i can seem to find are the actual spec, and a bunch of posts about seemingly unrelated usages.
Upvotes: -1
Views: 273
Reputation: 1562
The idea of the RDFa mapping is to specify which properties of the document you want to render with which tags. Actual content typically is WYSIWYG. I guess RDFa being quite complex it would support inline-nested information like what you are asking for. But the midgard/createphp component which reads this XML configuration to generate the right data does not support nested content. I am not sure if create.js would support it, but i think not.
Note that you can map children and output whole content hierarchies. But that would not handle your emphasised fragment.
Upvotes: 1