小编Ale*_*x G的帖子

GitHub - 阻止协作者使用push -f

有没有办法阻止强制推入分支或存储库?

我想阻止重要的分支机构无意中或故意重写其历史记录.人们如何在大型开发团队中处理这个问题?

理想情况下,在我看来,可以锁定每个存储库的几个分支,并防止除了存储库所有者之外的所有人强行推入它们.

git github git-push

33
推荐指数
2
解决办法
1万
查看次数

创建XSLT转换以展平multiRef编码的SOAP消息

输入是mutliRef编码的SOAP消息/文档.你如何使用XSLT来展平multiRefs.Multiref节点可以多次引用,并且它们自己递归引用其他multiRef节点.

可以安全引用的结构的唯一部分是multiRef元素和@id和@href属性.其他元素或命名空间可能会更改.

示例输入消息是:

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <ns1:getAccountDTOResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:ns1="http://www.example.com/pw/services/PWServices">
      <getAccountDTOReturn href="#id0" />
    </ns1:getAccountDTOResponse>
    <multiRef id="id0" soapenc:root="0"
    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xsi:type="ns2:Account"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:ns2="urn:PWServices">
      <ID href="#id1" />
      <accountNumber xsi:type="soapenc:string"></accountNumber>
      <accountType xsi:type="soapenc:string"></accountType>
      <clientData xsi:type="soapenc:Array" xsi:nil="true" />
      <name xsi:type="soapenc:string"></name>
      <parentRef xsi:type="soapenc:string"></parentRef>
    </multiRef>
    <multiRef id="id1" soapenc:root="0"
    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xsi:type="xsd:long"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    0</multiRef>
  </soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)

预期产出是:

<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <ns1:getAccountDTOResponse xmlns:ns1="http://www.example.com/pw/services/PWServices"
    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

      <getAccountDTOReturn xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:ns2="urn:PWServices"
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xsi:type="ns2:Account">
        <ns1:ID soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        xsi:type="xsd:long">0</ns1:ID>
        <ns1:accountNumber xsi:type="soapenc:string" />
        <ns1:accountType xsi:type="soapenc:string" />
        <ns1:clientData xsi:type="soapenc:Array" xsi:nil="true" />
        <ns1:name …
Run Code Online (Sandbox Code Playgroud)

xml xslt soap

1
推荐指数
1
解决办法
6342
查看次数

标签 统计

git ×1

git-push ×1

github ×1

soap ×1

xml ×1

xslt ×1