comparison tools/http-status-codes.lua @ 12271:f31bb79f51d7

tools: Allow processing instructions in some XML parsing tools IANA registry files have XSLT references, which are harmless to ignore.
author Kim Alvefur <zash@zash.se>
date Fri, 04 Feb 2022 21:20:48 +0100
parents cce55767004a
children 879a6a33c21b
comparison
equal deleted inserted replaced
12270:c78639ee6ccb 12271:f31bb79f51d7
1 -- Generate net/http/codes.lua from IANA HTTP status code registry 1 -- Generate net/http/codes.lua from IANA HTTP status code registry
2 2
3 local xml = require "util.xml"; 3 local xml = require "util.xml";
4 local registry = xml.parse(io.read("*a")); 4 local registry = xml.parse(io.read("*a"), { allow_processing_instructions = true });
5 5
6 io.write([[ 6 io.write([[
7 7
8 local response_codes = { 8 local response_codes = {
9 -- Source: http://www.iana.org/assignments/http-status-codes 9 -- Source: http://www.iana.org/assignments/http-status-codes