Skip to content

Instantly share code, notes, and snippets.

@ohsh6o
Created June 9, 2021 14:55
Show Gist options
  • Save ohsh6o/c3391440715ae87df641ebc492841ee1 to your computer and use it in GitHub Desktop.
Save ohsh6o/c3391440715ae87df641ebc492841ee1 to your computer and use it in GitHub Desktop.
Filtered IANA Registry File Type Listing
xquery version "3.1";
declare namespace iana="http://www.iana.org/assignments";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method "text";
declare option output:item-separator "
";
let $registry := doc("https://www.iana.org/assignments/media-types/media-types.xml")/iana:registry
for $n in $registry//iana:record/iana:file[@type="template"]
where
contains($n/text(), "vnd.ms-") or
contains($n/text(), "vnd.openxmlformats-officedocument")
return
concat("- ", $n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment