Language Identification for Program Code in Documents

This paper proposes a simple approach to labelling the language of programming code embedded in structured documents, using standard language attributes (such as xml:lang and HTML lang ) with a single reserved language code qpr , and specific programming languages and/or data formats distinguished via the following portion. This approach facilitates language-specific processing including syntax highlighting, spell checking, and validation while maintaining backward compatibility with existing document processing systems.

Authors

Publication Details

Journal
Balisage series on markup technologies
Published
2025-07-26
DOI
https://doi.org/10.4242/balisagevol30.derose02
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Language Identification for Program Code in Documents

Steven J. DeRose
Balisage series on markup technologies
Software Engineering Research
article

Language Identification for Program Code in Documents

Steven J. DeRose
article en

Abstract

This paper proposes a simple approach to labelling the language of programming code embedded in structured documents, using standard language attributes (such as xml:lang and HTML lang ) with a single reserved language code qpr , and specific programming languages and/or data formats distinguished via the following portion. This approach facilitates language-specific processing including syntax highlighting, spell checking, and validation while maintaining backward compatibility with existing document processing systems.

Balisage series on markup technologiesVol. 30
Openalex Percentile: Top 49%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Language Identification for Program Code in Documents — Steven J. DeRose · Balisage series on markup technologies (2025) | TGRS Research Map | TGRS