3

We have a snippet of code in our footer of:

<nav prefix="go: http://www.sdl.com/web/schemas/core" typeof="go:FooterConfiguration">

The prefix of go to the schema core is 404ing. Any ideas whether it is needed by webapp or where it should go too?

2
  • Can you elaborate what you mean with "The prefix of go to the schema core is 404ing""? Commented Jun 14, 2018 at 10:24
  • Yes, so if you go to sdl.com/web/schemas/core it is returning a 404 error. This is being picked up on our website. What we are trying to establish is what is that prefix/URL, if it is needed and if it is needed how do we fix it so it isn't going to an error page. I hope that makes sense?
    – Mike
    Commented Jun 14, 2018 at 10:26

1 Answer 1

2

In general, the prefix and typeof HTML attributes are so-called RDFa attributes: these are used to specify the semantics of HTML elements (which themselves tend to be more formatting-oriented).

More specifically: these attributes allow you to map HTML elements to semantic types or properties which are defined in a public Vocabulary (such as Schema.org).

In your case, they are referring to the Vocabulary with URI http://www.sdl.com/web/schemas/core. This is not a public Vocabulary, but used internally by DXA to do semantic mapping to CM Schemas. It does not make sense to use this as a public Vocabulary.

The reason why this happens is because your View Models have a SemanticEntity annotation that declares the "SDL Core" vocabulary as Public. I see people doing that a lot, but it does not make sense.

3
  • Thanks Rick. Just to confirm, do we need to have it at all? I am guessing we do so the DXA can do the semantic mapping to CM Schemas?
    – Mike
    Commented Jun 14, 2018 at 10:44
  • You may or may not need SemanticEntity and SemanticProperty attributes to do the semantic mapping to CM Schemas. DXA can do implicit mapping too. For more info, see the DXA docs Commented Jun 14, 2018 at 12:19
  • Thank you, we will take a look at the documentation and work it out
    – Mike
    Commented Jun 14, 2018 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.