datatypes w = "http://whattf.org/datatype-draft"
namespace local = ""
# #####################################################################
## RELAX NG Schema for HTML 5: Embedded Content #
# #####################################################################
#######################################################################
## Replaced Content
## Images:
img.elem =
element img { img.inner & img.attrs }
img.attrs =
( common.attrs
& img.attrs.src
& img.attrs.srcset?
& img.attrs.sizes?
& img.attrs.alt? # ARIA: if alt empty, only allowed role value is "presentation"; check in assertions
& img.attrs.height?
& img.attrs.width?
& img.attrs.usemap?
& img.attrs.ismap?
& img.attrs.border? # obsolete
& embedded.content.attrs.crossorigin?
& ( common.attrs.aria.implicit.img
| common.attrs.aria
)?
)
img.attrs.src =
attribute src {
common.data.uri.non-empty
}
img.attrs.srcset =
attribute srcset {
string
} & v5only
img.attrs.sizes =
attribute sizes {
common.data.source.size.list
} & v5only
img.attrs.alt =
attribute alt {
text
}
img.attrs.height =
attribute height {
common.data.integer.non-negative
}
img.attrs.width =
attribute width {
common.data.integer.non-negative
}
img.attrs.usemap =
attribute usemap {
common.data.hash-name
}
img.attrs.ismap =
attribute ismap {
w:string "ismap" | w:string ""
}
img.attrs.border =
attribute border {
common.data.zero
}
img.inner =
empty
common.elem.phrasing |= img.elem
## Image with multiple sources: