Home
Blog
Overview of all products
SalesData
LibraryData
CataList
Loan Stars
BiblioShare
Webform
EDI
Products for publishers
Products for retailers
Products for libraries
Information for authors
BNC Research
Canadian literary awards
SalesData & LibraryData Research Portal
Events
Tech Forum
Webinars & Training
Code of Conduct
Standards
EDI standards
Product identifiers
Classification schemes
ONIX standards
About
Contact us
Media
Bestseller lists
Newsletters
Podcast
Jobs
SalesData
LibraryData
CataList
BiblioShare
Webform
EDI

BookNet Canada

Home
Blog
Overview of all products
SalesData
LibraryData
CataList
Loan Stars
BiblioShare
Webform
EDI
Products for publishers
Products for retailers
Products for libraries
Information for authors
BNC Research
Canadian literary awards
SalesData & LibraryData Research Portal
Events
Tech Forum
Webinars & Training
Code of Conduct
Standards
EDI standards
Product identifiers
Classification schemes
ONIX standards
About
Contact us
Media
Bestseller lists
Newsletters
Podcast
Jobs
SalesData
LibraryData
CataList
BiblioShare
Webform
EDI
BookNet Canada
December 6, 2021
ONIX, Standards & Metadata

The importance of <MainSubject/> in your ONIX

BookNet Canada
December 6, 2021
ONIX, Standards & Metadata

Thank you to Chris Saynor, EDItEUR’s Standards Editor, for allowing us to share the following content on our blog.

 

@EDItEUR_org's Chris Saynor writes for the @BookNet_Canada blog about the importance of using the Main Subject tag in ONIX 3.0.
CLICK TO TWEET

When sending multiple subject codes from a scheme such as Thema, BISAC, or any other scheme that accepts multiple codes in an ONIX file, it's important to include an indication of which of the several codes is the principal code. This is done using the <MainSubject/> tag in ONIX 3.0.

This tag allows those who receive ONIX files to identify the single most important subject of the book even if there are several subject codes. If a physical bookseller only has a single copy, the main subject code will indicate the best place to shelve that title.

The other important function — which only applies to Thema — of the <MainSubject/> tag arises because Thema encourages post-coordination, that is, creating greater detail by using more than one code. This means Fiction and Non-Fiction codes could occasionally be used to describe the same title. When using a Non-Fiction code combined with a Fiction code in Thema to give greater detail about the setting or milieu of a story, one of the codes for Fiction MUST always be designated as <MainSubject/>. This tells anyone who receives the ONIX file that this is a Fiction title and not Non-Fiction.

For example, if you were publishing a novel set in the world of Gaelic football, you would have to use the Sports Fiction code “FG” as the <MainSubject/> along with the Gaelic Football Non-Fiction code, “SFBK,” to say “Sports Fiction about Gaelic football.”

 

<Subject>

    <MainSubject/>

    <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier>

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>FG</SubjectCode>      <!--Sports fiction -->

</Subject>

<Subject>

    <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier>

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>SFBK</SubjectCode>    <!-- Gaelic football -->

</Subject>

 

If it were a children’s story about Gaelic football, you would apply the same principle, normally with two “Y” codes. The Fiction code for sporting stories, “YFR,” must be the main subject, so we know it’s a story and not Non-Fiction, plus the Non-Fiction for children’s / teenage Non-Fiction ball games. Then, for an extra level of detail, in this example, you could also send the (adult) Non-Fiction code for Gaelic football “SFBK,” as there is no precise code in the “Y” section for Gaelic football.

This is a basic rule for any work of Fiction and Thema code: you can use Non-Fiction codes with them, but a Fiction code MUST always be the <MainSubject/>.

The fact that “YFR” is the <MainSubject/> here has an even more important role, as it confirms the title is Fiction meant for children or teenagers — the exact detail of the age group should be confirmed with an interest age qualifier, “5A*.” One “5A*” qualifier must be included if you are sending a “Y*” subject code. The “5A*” codes effectively replace words like “Juvenile Fiction” or “middle-grade” Fiction.

 

<Subject>   

    <MainSubject/> 

    <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>YFR</SubjectCode>     <!-- Children’s / Teenage fiction: Sporting stories -->

</Subject>  

<Subject>   

    <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>YNWD</SubjectCode>    <!-- Children’s / Teenage general interest: Ball games and sports -->

</Subject>

<Subject>   

    <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>SFBK</SubjectCode>    <!-- Gaelic football -->

</Subject>

<Subject>   

    <SubjectSchemeIdentifier>98</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>5AJ</SubjectCode>     <!-- Interest age: from c 8 years -->

</Subject>

 

Of course, <Audience> and <AudienceRange> would also be added in ONIX and can give a more precise age range (e.g., 8 to 11 years) and a distinction can also be made between reading and interest age. In Thema the ages are always interest ages.

<MainSubject/> used with post-coordination is particularly important in titles aimed at teenagers. There are a lot of stories written with adolescents in mind that deal with strong social topics or themes and combining “YF” codes with other (Non-Fiction) “Y*” codes allows publishers to express these themes and enables retailers to create more detailed browse sections or filtered search options.

 

<Subject>   

    <MainSubject/> 

    <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>YFM</SubjectCode>     <!-- Children’s / Teenage fiction: Relationship stories -->

</Subject>  

<Subject>   

    <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>YXB</SubjectCode>     <!-- Children’s / Teenage personal and social topics LGBTQ+ -->

</Subject>

<Subject>   

    <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>YXG</SubjectCode>     <!-- Children’s / Teenage personal and social topics: death and bereavement-->

</Subject>

<Subject>   

    <SubjectSchemeIdentifier>93</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>YXHB</SubjectCode>    <!-- Children’s / Teenage personal and social topics: friends and friendship -->

</Subject>

<Subject>   

    <SubjectSchemeIdentifier>98</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>5AQ</SubjectCode>     <!-- Interest age: from c 14 years -->

</Subject>

<Subject>   

    <SubjectSchemeIdentifier>98</SubjectSchemeIdentifier> 

    <SubjectSchemeVersion>1.4</SubjectSchemeVersion>

    <SubjectCode>5PSG</SubjectCode>    <!-- Relating to gay people -->

</Subject>

 

If you're creating a user interface to manage Thema codes, it's important that users who are managing the metadata can designate which code is going to be the main one. This applies to any subject scheme listed in ONIX code list 27 where you can send more than one subject code: one of these per scheme should be the <MainSubject/>.

<MainSubject/> is sometimes misused, or misunderstood, to indicate the broad category from where a detailed category code is also supplied, for example, Thema code “Y” as the Main subject and “YFJ” as an additional subject. “Main” does not mean “broad” or “top level” — it should always be used to indicate the most relevant detailed category.

These Thema top level codes, like “Y,” should not be used — they are too vague and do not provide the detail needed. Also, as with any hierarchal code scheme, you should not be sending the parent or grandparent codes of a more detailed code, as these are already an integral part of the code you are supplying. “YFJ,” for example, includes “Y” and “YF” in its structure, so “Y” and “YF” should never be used alongside “YFM”, for example.

Note the <MainSubject/> is an XML “empty tag” and cannot contain any actual data. It acts as a “flag” to indicate the main subject.

 

For additional ONIX, Thema, and Standards-focused content, visit our blog.

Subscribe

Don’t miss any new blog posts. Sign up for our weekly eNews to receive updates.

You can unsubscribe at any time. We respect your privacy.

Thank you!
Recent posts
Easier with BookNet: Share notes with contact lists and groups in CataList
Easier with BookNet: Share notes with contact lists and groups in CataList

The Notes feature can be used to save notes privately or share them with your team or clients of your choice. Learn more about how else you can use Notes!

Read More →
Podcast: A peek into Canadians' reading
Podcast: A peek into Canadians' reading

Listen in as we give you some of the highlights from our forthcoming report, Canadian Leisure & Reading Study 2025.

Read More →
Results from the AI use across the North American book industry survey
Results from the AI use across the North American book industry survey

This report shares insights into the adoption of AI, applications of the technology, perception of value, interest in training, areas of concern, and more.

Read More →
Thema: The missing half to your subject classification strategy
Thema: The missing half to your subject classification strategy

Why and how should you use Thema? Here’s a series of resources that will help you understand its capabilities and help you get started in implementing it!

Read More →
The nuances of online book marketing in 2026
The nuances of online book marketing in 2026

Ariel Hudnall, managing director of Serif, shares key insights into developing digital marketing strategies for the publishing industry.

Read More →
Canadian Independent Bookstore Day 2026
Canadian Independent Bookstore Day 2026

Celebrate Canadian independent bookstores on April 25!

Read More →
ONIX Codelist 73 released
ONIX Codelist 73 released

Insights into the latest updates and additions made to ONIX codelists.

Read More →
Must-watch, must-read: The Oscars 2026 effect
Must-watch, must-read: The Oscars 2026 effect

How did being nominated for the Oscars in 2026 impact book sales, loans and holds among Canadians?

Read More →
5 key takeaways from trendspotting
5 key takeaways from trendspotting

What’s been trending in the Canadian publishing industry?

Read More →
Highlights from The Canadian Book Market 2025
Highlights from The Canadian Book Market 2025

Want to make data-informed decisions? We can help.

Read More →
EDItEUR releases latest ONIX 3.1 revision 3
EDItEUR releases latest ONIX 3.1 revision 3

EDItEUR announces publication of ONIX 3.1 revision 3.

Read More →
Podcast: The importance of social media in the publishing industry
Podcast: The importance of social media in the publishing industry

Founder of Tandem Collective, Naomi Bacon, talks to us about how social media can be used to market books.

Read More →

Tagged: onix 3.0

Newer PostBookNet reading: Stats and staff picks 2021
Older PostMeet the Loan Stars: Elizabeth MacLeod
No results found
Blog RSS

The Canadian Book Market 2025 is the comprehensive guide to the Canadian market with in-depth category data.

Get your copy now

Listen to our latest podcast episode


  • Research & Analysis 475
  • Ebooks 304
  • Tech Forum 278
  • Conferences & Events 262
  • Standards & Metadata 249
  • Bookselling 221
  • Publishing 199
  • ONIX 193
  • Marketing 153
  • Podcasts 127
  • ebookcraft 112
  • BookNet News 106
  • Loan Stars 76
  • Libraries 67
  • BiblioShare 59
  • 5 Questions With 53
  • SalesData 51
  • Thema 47
  • CataList 44
  • Awards 30
  • Diversity & Inclusion 21
  • Sustainability 19
  • Publishing & COVID-19 18
  • EU Regulations 16
  • LibraryData 10
  • ISNI 4

 

 

BookNet Canada is a non-profit organization that develops technology, standards, and education to serve the Canadian book industry. Founded in 2002 to address systemic challenges in the industry, BookNet Canada supports publishing companies, booksellers, wholesalers, distributors, sales agents, industry associations, literary agents, media, and libraries across the country.

 

Privacy Policy | Accessibility Policy | About Us

BOOKNET CANADA

Contact us | (416) 362-5057 or toll free 1 (877) 770-5261

We acknowledge the financial support of the Government of Canada through the Canada Book Fund (CBF) for this project.

Back to Top

BookNet Canada acknowledges that its operations are remote and our colleagues contribute their work from the traditional territories of the Mississaugas of the Credit First Nation, the Anishnawbe, the Haudenosaunee, the Wyandot, the Mi’kmaq, the Ojibwa of Fort William First Nation, the Three Fires Confederacy of First Nations (which includes the Ojibwa, the Odawa, and the Potawatomie), and the Métis, the original nations and peoples of the lands we now call Beeton, Brampton, Guelph, Halifax, Thunder Bay, Toronto, Vaughan, and Windsor. We endorse the Calls to Action from the Truth and Reconciliation Commission of Canada (PDF) and support an ongoing shift from gatekeeping to spacemaking in the book industry.