{
    "/.*/": {
        "attrs": {
            "style": {
                "disallow": true
            },
            "/^on.+/": {
                "disallow": true
            }
        }
    },

    "html": {
        "mandatory": true,
        "attrs": {
            "mip": {
                "mandatory": true
            }
        },
        "duplicate": true
    },

    "meta": {
        "duplicate": [{
            "name": "/^viewport/"
        }, {
            "http-equiv": "/Content-Type/i"
        }, {
            "charset": "/^(UTF-8)/i"
        }],
        "attrs": {
            "content": [{
                "match": {
                    "name": "/^viewport/"
                },
                "properties": {
                    "width": "device-width",
                    "initial-scale": "1"
                }
            }]
        },
        "mandatory_or": [{
            "http-equiv": "/Content-Type/i",
            "content": "/charset=(utf)|(UTF)-8/"
        }, {
            "charset": "/^(utf)|(UTF-8)/"
        }],
        "mandatory": {
            "name": "/^(viewport)?/",
            "content": "/((width|initial-scale)=.+){2}/"
        },
        "mandatory_parent": "head"
    },
    "link": {
        "mandatory": [{
            "rel": "/^(miphtml)|(canonical)$/",
            "href": "/^(http(s)?:)?\/\//"
        }, {
            "rel": "/^stylesheet$/",
            "href": "/^(https:)?\/\/((mipcache\\.bdstatic\\.com\/static\/mipmain-v\\d\\.\\d\\.\\d\\.css)|(mipcache\\.bdstatic\\.com\/static\/v\\d\/mip\\.css)|(c\\.mipcdn\\.com\/static\/v\\d\/mip\\.css)|(c\\.mipcdn\\.com\/static\/mipmain-v\\d\\.\\d\\.\\d\\.css)|(\\S+\\.sm-tc\\.cn\/static\/v\\d\/mip\\.css)|(\\S+\\.transcode\\.cn\/static\/v\\d\/mip\\.css))$/"
        }],
        "mandatory_parent": "head",
        "duplicate": [{
            "rel": "/^(miphtml)|(standardhtml)$/"
        }, {
            "rel": "/^(miphtml)|(canonical)$/"
        }, {
            "rel": "/^stylesheet$/",
            "href": "/^(https:)?\/\/(mipcache.bdstatic.com\/static\/mipmain)|(m.baidu.com\/static\/ala\/sf\/static\/)|(c.mipcdn.com\/static\/mipmain)/"
        }],
        "attrs": {
            "href": [{
                "value": "/^(http(s)?:)?\/\//",
                "match": {
                    "rel": "/^(miphtml)|(canonical)$/"
                }
            }, {
                "value": "/^(?!\/[^\/])/",
                "match": {
                    "rel": "/^(?!((miphtml)|(canonical))$)/"
                }
            }]
        }
    },
    "script": [
    {
        "mandatory": {
            "src": "/^(https:)?\/\/((mipcache\\.bdstatic\\.com\/static\/mipmain-v\\d\\.\\d\\.\\d\\.js)|(mipcache\\.bdstatic\\.com\/static\/v\\d\/mip\\.js)|(c\\.mipcdn\\.com\/static\/v\\d\/mip\\.js)|(c\\.mipcdn\\.com\/static\/mipmain-v\\d\\.\\d\\.\\d\\.js)|(\\S+\\.sm-tc\\.cn\/static\/v\\d\/mip\\.js)|(\\S+\\.transcode\\.cn\/static\/v\\d\/mip\\.js))$/"
        }
    },
    {
        "match": {
            "src": "/^(https:)?\/\/((mipcache\\.bdstatic\\.com)|(c\\.mipcdn\\.com)|(\\S+\\.sm-tc\\.cn)|(\\S+\\.transcode\\.cn))(\/([\\s\\S]*))?$/"
        },
        "attrs": {
            "type": {
                "value": "/^(((application)|(text))\/javascript)$/"
            }
        }
    }, {
        "match_ancestor": "head",
        "match": {
            "src": "/^(https:)?\/\/((mipcache\\.bdstatic\\.com)|(c\\.mipcdn\\.com)|(\\S+\\.sm-tc\\.cn)|(\\S+\\.transcode\\.cn))(\/([\\s\\S]*))?$/"
        },
        "attrs": {
            "async": {
                "mandatory": true
            }
        }
    }, {
        "disallow": true,
        "match": {
            "type": "/^(?!application\/(ld\\+)?json$)/",
            "src":"/^(?!((https:)?\/\/((mipcache\\.bdstatic\\.com)|(c\\.mipcdn\\.com)|(\\S+\\.sm-tc\\.cn)|(\\S+\\.transcode\\.cn))(\/([\\s\\S]*))?$))/"
        }
    }, {
        "disallowed_ancestor": "template"
    }],
    "mip-input": {
        "mandatory_ancestor": "mip-form",
        "attrs": {
            "name": {
                "mandatory": true
            }
        }
    },
    "img": {
        "disallow": true
    },
    "video": {
        "disallow": true
    },
    "audio": {
        "disallow": true
    },
    "frame": {
        "disallow": true
    },
    "frameset": {
        "disallow": true
    },
    "iframe": {
        "disallow": true
    },
    "object": {
        "disallow": true
    },
    "param": {
        "disallow": true
    },
    "applet": {
        "disallow": true
    },
    "embed": {
        "disallow": true
    },
    "form": {
        "disallow": true
    },
    "input": {
        "mandatory_ancestor": "mip-form"
    },
    "textarea": {
        "mandatory_ancestor": "mip-form"
    },
    "select": {
        "mandatory_ancestor": "mip-form"
    },
    "option": {
        "mandatory_ancestor": "mip-form"
    },
    "a": {
        "attrs": {
            "href": {
                "mandatory": true,
                "value": "/^((?!javascript:).*)$/"
            }
        }
    },
    "mip-img": {
        "attrs_or": [{
            "src": "/^\\S+$/"
        }, {
            "srcset": "/^\\S+$/"
        }],
        "attrs": {
            "src": {
                "value": "/^\\S+$/"
            },
            "srcset": {
                "value": "/^\\S+$/"
            }
        }
    },
    "mip-pix": {
        "attrs": {
            "src": {
                "mandatory": true,
                "value": "/^((https:)?\/\/)|(http:\/\/*\\?)/"
            }
        }
    },
    "mip-video": {
        "attrs": {
            "src": {
                "mandatory": true,
                "nomatch_descendant": "source"
            }
        }
    },
    "source": {
        "mandatory_ancestor": "/picture|mip-video|mip-audio/",
        "attrs": {
            "src": {
                "mandatory": true,
                "value": "/^(?!\/[^\/])/"
            }
        }
    },
    "mip-carousel": {
        "attrs": {
            "width": {
                "mandatory": true,
                "value": "/^\\d{1,4}$/"
            },
            "height": {
                "mandatory": true,
                "value": "/^\\d{1,4}$/"
            }
        }
    },
    "mip-iframe": {
        "attrs": {
            "width": {
                "mandatory": true,
                "value": "/^\\d{1,4}$/"
            },
            "height": {
                "mandatory": true,
                "value": "/^\\d{1,4}$/"
            }
        }
    },
    "mip-appdl": {
        "attrs": {
            "tpl": {
                "mandatory": true,
                "value": "/^(noneImg)|(imageText)$/"
            },
            "src": {
                "mandatory": true,
                "value": "/^http(s)?:\/\//",
                "match": {
                    "tpl": "imageText"
                }
            },
            "texttip": {
                "mandatory": true,
                "value": "/^\\S+$/"
            }
        }
    },
    "mip-audio": {
        "attrs": {
            "src": {
                "mandatory": true,
                "value": "/^(?!\/[^\/])/"
            }
        }
    },
    "mip-stats-bidu": {
        "attrs": {
            "token": {
                "mandatory": true,
                "value": "/^\\S+$/"
            }
        }
    },
    "mip-form": {
        "attrs": {
            "method": {
                "value": "/^((post)|(get))$/i"
            },
            "url": {
                "mandatory": true,
                "value": "/^(http(s)?:)?\/\//"
            }
        }
    },
    "mip-link": {
        "attrs": {
            "href": {
                "mandatory": true,
                "value": "/^((?!javascript:).*)$/"
            }
        }
    },
    "mip-ad": {
        "attrs": {
            "type": {
                "mandatory": true
            }
        }
    },
    "mip-embed": {
        "attrs": {
            "type": {
                "mandatory": true
            }
        }
    },
    "mip-vd-baidu": {
        "attrs": {
            "src": {
                "mandatory": true,
                "value": "/^(http(s)?:)?\/\//"
            },
            "title": {
                "mandatory": true,
                "value": "/^\\S+$/"
            },
            "poster": {
                "mandatory": true,
                "value": "/^\\S+$/"
            }
        }
    },
    "mip-shell": {
        "duplicate": true
    },
    "head": {
        "duplicate": true,
        "mandatory": true,
        "mandatory_parent": "html"
    },
    "body": {
        "duplicate": true,
        "mandatory": true,
        "mandatory_parent": "html"
    },
    "style": {
        "attrs": {
            "mip-custom": {
                "mandatory": true
            }
        },
        "duplicate": true,
        "mandatory_parent": "head"

    },
    "template": {
        "attrs": {
            "type": {
                 "mandatory": true
            }
        }
    },
    "base": {
        "duplicate": true,
        "mandatory_parent": "head",        
        "attrs_or": [{
            "target": "/^((_top)|(_self)|(_blank))$/i"
        }, {
            "href": "/^\/$/"
        }],
        "attrs": {
            "target": {
                "value": "/^((_top)|(_self)|(_blank))$/i"
            },
            "href": {
                "value": "/^\/$/"
            }
        }
    }
}