Skip to content

Instantly share code, notes, and snippets.

@riffm
riffm / gist:2780475
Created May 24, 2012 09:38
greping for xmlns shortcuts
sed -r -e "s/xmlns:(\w+)=(\"|')[-:.\/a-zA-Z0-9]+/\n\0\n/g" $(find . -name '*.xsd') | grep 'xmlns:\w\+=' | sed -r -e 's/xmlns://g' -e "s/=(\"|')/\t/g"
@riffm
riffm / rename-ns-shortcuts.sh
Created May 24, 2012 11:26
change xmlns shortcuts
#!/bin/sh
sed -i -r -e "s/xmlns:$1=/xmlns:$2=/g" -e "s/(\"|'|<|\/)$1:/\1$2:/g" $(find . -name '*.xsd')
16
10 8
10 5
8 1
5 3
2 1
1 5
3 8
9 2
3 1
@riffm
riffm / c14n2.xml
Created November 6, 2012 15:35
c14n2 params example
<?xml version="1.0" encoding="UTF-8"?>
<sec:Security xmlns:sec="urn:sec" xmlns:wsu="urn:wsu" xmlns:wsse="urn:wsse"
xmlns:ds="urn:ds">
<wsu:Timestamp wsu:Id="TIMESTAMP">
<wsu:Created wsu:Id="CREATED">2012-11-07T15:52:00</wsu:Created>
</wsu:Timestamp>
<wsse:BinarySecurityToken EncodingType="http://www.ietf.org/rfc/rfc4648.txt"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
wsu:Id="TOKEN">
TOKEN_VALUE