MIME resolver description root element.
PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN"
Element Content Model
(file)+Referenced by
MIME component checking XML resource header, permitting matches against XML constructs: processing instructions, document type declarations, and root element (start tag).
PUBLIC "-//NetBeans//DTD MIME Resolver XML Rules 1.0//EN"
It should work well for:Element Content Model
(pi*, doctype?, element?)Referenced by
resolverProcessing instructions can be tested on target and pseudo-attributes.
It should be used for in-band tagging that is specified by some
accepted specification. For NetBeans-specific tagging of third party standards it is
recommended to use out-of-band tagging such as FileObject attributes.
Declared Attributes
Element Content Model
(attr*)Referenced by
xml-ruleMatch one of the DOCTYPE's public IDs.
Use of public-id subelements is mutually exclusive with the attribute.
Declared Attributes
Element Content Model
(public-id*)Referenced by
xml-ruleA public ID is checked for an exact match.
Declared Attributes
Element Content Model
EMPTYReferenced by
doctypeMatches a root element by specified name, attributes or namespace.
The namespace ns attribute or the presence of any ns subelements
implies that the name attribute represents a local element name,
otherwise the name attribute represents a full element name ("QName").
One of the namespaces must match.
Declared Attributes
Element Content Model
(ns*, attr*)Referenced by
xml-ruleTest namespace equality (exact match).
Declared Attributes
Element Content Model
EMPTYReferenced by
elementElement attribute template, also used for pseudo-attributes in processing instructions.
The name attribute contains the full attribute name (QName).
This is inteded to be used for documents that cannot be indentified by public ID nor
root element namespace.
text is specified then the attribute's normalized text must
exactly match the specified text, otherwise the attribute just needs to be present.
Declared Attributes
Element Content Model
EMPTYReferenced by
pi, elementA file (resource) represents the MIME resolver input.
The resource is tested on attributes obtained from lower layers (OS) such
as extension, header bytes and wrapping FileObject attributes.
Some of them must match to proceed to the resolver element.
Implementation Note:
Lower level MIME type is obtained by FileUtil.getMIMEType(). It may not be
retrieved by a call to FileObject.getMIMEType to avoid recursion. A better way
to determine MIME type as assigned by the OS may be introduced in the future.
Implementation Note:
All other tests are performed by calling appropriate methods on FileObject
so there is a danger of recursion if these call this.getMIMEType().
Element Content Model
((ext | mime | magic | fattr)+, (resolver | exit))Referenced by
MIME-resolverTests resource extension for full equality.
Declared Attributes
Element Content Model
EMPTYReferenced by
fileTests resource MIME type for equality (RFC2045) or suffix equality if it starts with '+' (RFC 3023).
Declared Attributes
Element Content Model
EMPTYReferenced by
fileLook at initial bytes of the file and test for a complete match of masked
bits. The default mask is the hexadecimal byte FF repeated as
many times as the hex attribute is long.
E.g. <magic hex="0a0001" mask="FF00FF"/>
Declared Attributes
Element Content Model
EMPTYReferenced by
fileTest on FileObject attributes. Matching attributes are converted
to strings via Object.toString() and compared to the text
attribute.
FileObject attributes can be used for out-of-band tagging of standard documents.
Declared Attributes
Element Content Model
EMPTYReferenced by
fileYou may apply additional rules based on resource content.
The mime element value is returned. Use the reserved value of null
to indicate you are not interested in such files (same as <exit/>).
Declared Attributes
Element Content Model
(xml-rule)?Referenced by
fileDeclares that this file is not recognized by this resolver. A shortcut for <resolver mime="null"/>.
Element Content Model
EMPTYReferenced by
file