Defining forum tree structure in SIOC

Hello,

I am experimenting with implementing SIOC on one of my websites. I've
already got the content, reactions and user profiles working.

I have one problem with the forum though, it is structured like a
tree, and I don't seem to be able to represent that structure with
SIOC.

The validator complains that the element Forum has multiple object
node elements.

Is it wrong for me to think that a sioc:Forum can be the parent of
more than one sioc:Forum? I've tried various approaches with
sioc:Container, sioc:Forum and sioc:parent_of and sioc:has_parent but
I keep getting a similar error.

A test case can be found here, can someone help me out here?

http://sparql.captsolo.net/browser/browser.py?url=http%3A//jongerenraadborsele.nl/forum/sioc.rdf

I think the SIOC-website should contain a page with example code to
make it more concrete what the specification means.

Kind regards,

John Hoogstrate

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
To post to this group, send email to sioc-dev@googlegroups.com
To unsubscribe from this group, send email to sioc-dev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sioc-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Defining forum tree structure in SIOC

On May 4, 12:27 pm, John Hoogstrate wrote:

> I am experimenting with implementing SIOC on one of my websites. I've
> already got the content, reactions and user profiles working.

Sounds good. :)

> The validator complains that the element Forum has multiple object
> node elements.
>
> Is it wrong for me to think that a sioc:Forum can be the parent of
> more than one sioc:Forum? I've tried various approaches with
> sioc:Container, sioc:Forum and sioc:parent_of and sioc:has_parent but
> I keep getting a similar error.

Sure, a sioc:Forum can be a parent of multiple other forums.

Problem here is caused by malformed RDF/XML - it is not specific to
SIOC, just there are some problems with the way data are marked up.
You can click the "Validate RDF" link in the SIOC browser, see what
errors are reported by the RDF Validator and get rid of them one by
one.

How to best solve it?

1) Add line-breaks to the markup - this will let RDF validator report
problems by line number and make them easier to find.

2) One place in particular that looks wrong is
{ ... } - the
correct way to say that a resource (e.g., of type sioc:Forum) is also
of type sioc:Container is to use the rdf:type property: { rdf:about=...> ... list of other properties here ...
}.
You may also skip defining this additional type (sioc:Container)
because sioc:Forum is a subclass of sioc:Container anyway.

3) To define that a forum A is a parent of forum B, C, D ... you need
to define the relationship they have (e.g., a sioc:parent_of). Just
define "A is a parent_of B", "A is a parent_of C", ... No need to
group the children forums together, each parent-child relationship is
independent of other.

Note that RDF is more flexible than XML and you do not need to
physically have subforums appear as children parent forum's XML
markup. You can follow a similar model how sioc:Site and its
relationship with sioc:Forums on a site is defined, e.g. in [1] -
first, describe a sioc:Site and its properties, including
relationships with forums that it contains, pointing to them by their
URIs (defined with rdf:about); second, describe individual
sioc:Forum(s) and their properties.

Analogy in your case would be:



...


... properties of forum B ...

...

[1] http://johnbreslin.com/blog/index.php?sioc_type=site

> I think the SIOC-website should contain a page with example code to
> make it more concrete what the specification means.

A good suggestion. What would you want to be shown in more detail?
We can use this wiki page [2] as a start - to point out what needs to
be shown by the code; and to provide examples needed.

[2] http://wiki.sioc-project.org/index.php/SIOC_Examples

Best,
Uldis

[ http://captsolo.net/info/ ]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
To post to this group, send email to sioc-dev@googlegroups.com
To unsubscribe from this group, send email to sioc-dev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sioc-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Defining forum tree structure in SIOC

Thank you for your feedback Uldis, I have got it working now, it makes
sense, but the solution is quite different from how I initially
thought. I didn't know that RDF has more specific rules than XML, I
always assumed that it was just another XML-namespace.

Now the articles, weblog, forum and gallery with all their reactions
and user profiles are available as SIOC-files. I'll might add the user
list and calendar in the future too.

For those interested, the result can be found here:
http://jongerenraadborsele.nl/sioc.rdf

I'll add the website to the list of SIOC-enabled websites once I am
sure that there are no more bugs remaining.

A small number of sioc-pages has illegal UTF-8 characters, because the
content is stored as ISO-8859-1. PHP's function utf8_decode still
let's a few characters slip through. Hopefully this problem will be
resolved when the database is upgraded later this year.

As for the examples, I think it would be good to have some small code
samples that show how to structure a weblog, photo gallery, events
calendar, user list, and which namespaces can be used for such
things.

On May 6, 9:04 pm, Uldis Bojars wrote:
> On May 4, 12:27 pm, John Hoogstrate wrote:
>
> > I am experimenting with implementing SIOC on one of my websites. I've
> > already got the content, reactions and user profiles working.
>
> Sounds good. :)
>
> > The validator complains that the element Forum has multiple object
> > node elements.
>
> > Is it wrong for me to think that a sioc:Forum can be the parent of
> > more than one sioc:Forum? I've tried various approaches with
> > sioc:Container, sioc:Forum and sioc:parent_of and sioc:has_parent but
> > I keep getting a similar error.
>
> Sure, a sioc:Forum can be a parent of multiple other forums.
>
> Problem here is caused by malformed RDF/XML - it is not specific to
> SIOC, just there are some problems with the way data are marked up.
> You can click the "Validate RDF" link in the SIOC browser, see what
> errors are reported by the RDF Validator and get rid of them one by
> one.
>
> How to best solve it?
>
> 1) Add line-breaks to the markup - this will let RDF validator report
> problems by line number and make them easier to find.
>
> 2) One place in particular that looks wrong is
> { ... } - the
> correct way to say that a resource (e.g., of type sioc:Forum) is also
> of type sioc:Container is to use the rdf:type property: { > rdf:about=...> ... list of other properties here ...
}.
> You may also skip defining this additional type (sioc:Container)
> because sioc:Forum is a subclass of sioc:Container anyway.
>
> 3) To define that a forum A is a parent of forum B, C, D ... you need
> to define the relationship they have (e.g., a sioc:parent_of). Just
> define "A is a parent_of B", "A is a parent_of C", ... No need to
> group the children forums together, each parent-child relationship is
> independent of other.
>
> Note that RDF is more flexible than XML and you do not need to
> physically have subforums appear as children parent forum's XML
> markup. You can follow a similar model how sioc:Site and its
> relationship with sioc:Forums on a site is defined, e.g. in [1] -
> first, describe a sioc:Site and its properties, including
> relationships with forums that it contains, pointing to them by their
> URIs (defined with rdf:about); second, describe individual
> sioc:Forum(s) and their properties.
>
> Analogy in your case would be:
>
>
>
> ...
>

>
>
> ... properties of forum B ...
>

>
> ...
>
> [1]http://johnbreslin.com/blog/index.php?sioc_type=site
>
> > I think the SIOC-website should contain a page with example code to
> > make it more concrete what the specification means.
>
> A good suggestion. What would you want to be shown in more detail?
> We can use this wiki page [2] as a start - to point out what needs to
> be shown by the code; and to provide examples needed.
>
> [2]http://wiki.sioc-project.org/index.php/SIOC_Examples
>
> Best,
> Uldis
>
> [http://captsolo.net/info/]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
To post to this group, send email to sioc-dev@googlegroups.com
To unsubscribe from this group, send email to sioc-dev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sioc-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Defining forum tree structure in SIOC

John -

Will you release your SIOC data producers from
http://jongerenraadborsele.nl/forum/sioc.rdf for others to use?

Thanks, all the best,

John.
--

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
To post to this group, send email to sioc-dev@googlegroups.com
To unsubscribe from this group, send email to sioc-dev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sioc-dev?hl=en
-~----------~----~----~----~------~----~------~--~---