cover image: ONIX for Books Product Information Message

20.500.12592/8hbz2j

ONIX for Books Product Information Message

19 May 2021

There are three standard ways in ONIX to include markup within a data element: 1 use XHTML without any other special treatment – this is the strongly preferred option 2 use HTML within the CDATA tag 3 use HTML, but change all < characters used in markup to < – this is the least preferred option With option 1, you have to add the textformat attribute with the value 05. [...] Then there are common issues with the escaping of the HTML markup: This is some text marked up with HTML. This is some text marked up with HTML. Only the second version is correct according to the standard. [...] The error in the first version is called ‘double-escaping’: you want & to appear in the final text when it is displayed, but in XML, & must be replaced by & But don’t then replace the & in & with another &. [...] If the < character occurs in the text of a short or long description, and I also want to include HTML or XHTML markup, how should I do that? Because the < character is used to mark the beginning of a markup tag, it can be confusing if you also want to include it as part of the text. [...] And it is the same with XHTML: < at the beginning of a tag stays as <, and a < intended to appear as part of the text should be encoded as < or <.
Pages
8
Published in
United Kingdom

Tables