Hello,
Property P381
https://www.wikidata.org/wiki/Property:P381
uses five digits including leading zeros, according to
https://www.babs.admin.ch/en/aufgabenbabs/kgs/inventar.html
Example:
https://www.wikidata.org/wiki/Q19362321
While
https://heritage.toolforge.org/api/api.php?action=search&format=html&srcountry=ch&srid=00133
leads to a blank page, the same id without leading zeros
https://heritage.toolforge.org/api/api.php?action=search&format=html&srcountry=ch&srid=133
returns the matching monument entry.
Would it be possible to match the srid, independent of possible leading zeros?
Maybe some JavaScript could be used as a possible workaround? For example, something like
https://heritage.toolforge.org/api/api.php?action=search&format=html&srcountry=ch&srid= + function_to_remove_leading_zeros ( $1 )
Thanks a lot!
Also see
https://www.wikidata.org/wiki/Topic:Xbcy58fywxh6shvz
https://www.wikidata.org/wiki/Wikidata:Project_chat#Adding/Removing_leading_zeros_for_URL_formatter
https://www.wikidata.org/wiki/Property_talk:P381#PCP_reference_number_(P381)_-_Broken_link_with_leading_0's
https://phabricator.wikimedia.org/T321633