It is really possible to embed a base64 encoded image inside an <img /> tag in html
The following links have more information on it:
Monthly Archives: December 2008
DTD Cheat Sheet
For reference this is the XML Specification (which also documentsDTD) and the version annotated by Tim Gray.
- A Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list of legal elements and attributes.
- A DTD can be internally defined e.g.
element-declarations
]>
or externally defined e.g.
<!DOCTYPE root-element SYSTEM “filename.dtd”>
where the element-declarations are in filename.dtd
- A simple example of DTD element-declarations
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
This says that note contains 2 child elements and to and from are of type #PCDATA .
- A DTD for an XML document may contain the following building blocks
- elements
- attributes
- entities (e.g. character entities)
- PCDATA (parsed character data parsed for entities and markup)
- CDATA (character data that is not parsed)
DTD Elements
- An element is defined as
or
- category can be either EMPTY or ANY
- element-content can be any combination of #PCDATA or child elements
- child_element+ – one or more occurrences
- child_element* – zero or more occurrences
- child_element? – zero or one occurrences
- (a|b) – Either a or b (can be #PCDATA)
- a,b – a and then b in that order
DTD Attributes
- An attribute specified in a DTD takes the form
attribute-name attribute-type default-value
attribute-name2 attribute-type2 default-value2
… >
for example:
currency CDATA “US Dollars”
amount CDATA #REQUIRED
form (Cash|Cheque) “Cheque”>
- attribute-type can be one of the following
- CDATA – character data
- (en1|en2|..) – one from an enumerated list
- ID – a unique id
- IDREF – the id of another element
- IDREFS – a list of other ids
- NMTOKEN – a valid XML name
- NMTOKENS – a list of valid XML names
- ENTITY – an entity
- ENTITIES – a list of entities
- NOTATION – a name of a notation
- xml: – a predefined xml value
- value – the default value of the attribute
- #REQUIRED – attribute is required but with no default
- #IMPLIED – attribute is optional and with no default
- #FIXED value – the attribute value is fixed
DTD Entities
- Entities are variables used to define shortcuts to standard text or special characters.
- Entities are declared in DTDs and can be declared internal e.g.
or external e.g.
- Entity references are references to entities and may be used inXML documents.
- An entity reference has three parts: an ampersand (&), an entity name, and a semicolon (;). e.g.
XML Course 11
Some DTD’s for the startup that was missed.
Controlling break space and white space in XSLT output
<xsl:output method=”xml” indent=”yes”/>
Saying indent=”yes” in xsl:output allows the processor to indent the output any way it chooses. If you don’t want that, don’t specify indent=”yes”; you will then get no extra whitespace in the output unless you create it explicitly using <xsl:value-of> or <xsl:text>.
If you want more intelligent formatting, you can use Saxon in schema-aware mode, validating the output against a schema. It will then avoid applying indentation to elements that are defined in the schema to have a mixed content model, which seems to be the effect you are looking for here.
———————————————–
<xsl:text>
</xsl:text>
</xsl:variable>
usage:
<xsl:value-of select=”$newline”> <!– line break in output file –>
———————————————–
http://www.ibm.com/developerworks/xml/library/x-tipwhitesp.html
<faqoutput><xsl:text>
</xsl:text><info xml:space=”preserve”>
<title xml:space=”default”>
<xsl:value-of select=”faqs/question/questiontitle”/>
</title>
</info>
<xsl:apply-templates/>
</faqoutput>
</xsl:template>
————————————————
<xsl:text>
</xsl:text>
————————————————
And if you use <xsl:if test=…>, you can send your literal
output based on an arbitrary condition.