wwpage
for page templates as follows:xmlns:wwpage="urn:WebWorks-Page-Template-Schema"
Attribute | Purpose |
---|---|
wwpage:condition | Controls when elements should be preserved in the generated output. |
wwpage:content | Use this attribute to replace the innerHTML or innerXML of an element. |
wwpage:replace | Use this attribute to replace the innerHTML /innerXML as well as the outerHTML /outerXML . |
wwpage:attribute-<name> | Use this attribute to emit a generated attribute value with name: name . In addition, you can specify a value of either: relative-to-output or copy-relative-to-output or wwsetting:<target-setting-name> . Specifying the value using relative-to-output is useful for file type attributes that require a pathname relative to the parent file. If the copy version is used, it additionally copies the file into the correct location within the generated output directory. |
wwpage:NoBreak | Use this attribute to collapse all white space between two elements into nothing. |
wwpage:Import | Use this attribute to indicate an that an import operation will take place using one of the *-from-* wwpage attributes. |
wwpage:content-from-file | Use this attribute to import the contents of the specified file as the innerHTML of an element. |
wwpage:replace-from-file | Use this attribute to import the contents of the specified file as the innerHTML as well as the outerHTML of an element. |
wwpage:content-from-lookup | Use this attribute to import the contents of the specified item name generated by ePublisher as the innerHTML of an element. |
wwpage:replace-from-lookup | Use this attribute to import the contents of the specified item name generated by ePublisher as the innerHTML as well as the outerHTML of an element. |
wwpage:attribute-<name>
to express attribute that uses a namespace of its own, you can use a “-” character in place of the “:” character. For example: wwpage:attribute-xml-lang
is used to generate the xml:lang attribute in the output.wwpage
attributes within a Page.asp
or Splash.asp
page template.Attribute | Example usage in Page.asp page template |
---|---|
wwpage:condition | <hr wwpage:condition="header-exists" align="left" /> |
wwpage:content | <title wwpage:content="title">Title</title> |
wwpage:replace | <div wwpage:replace="content">Page content.</div> |
wwpage:attribute-<name> | <link rel="StyleSheet" href="css/print.css" wwpage:attribute-href="copy-relative-to-output" type="text/css" media="print" /> |
wwpage:NoBreak | <a href="#"> |
wwpage:Import | <wwpage:Import wwpage:replace-from-file="scripts/common.js" /> |
wwpage:content-from-file | <div wwpage:Import wwpage:content-from-file="scripts/common.js"></div> |
wwpage:replace-from-file | <wwpage:Import wwpage:replace-from-file="css/webworks.css" /> |
wwpage:content-from-lookup | <div wwpage:Import wwpage:content-from-lookup="catalog-css"></div> |
wwpage:replace-from-lookup | <wwpage:Import wwpage:replace-from-lookup="catalog-css" /> |
wwpage:condition
attribute supports both logical AND
as well as OR
to provide for multiple conditions in a single attribute expression. For a logical AND
, use white space as a separator between conditions. For a logical OR
, use a single comma as a separator between conditions. The following shows a few simple examples of using multiple conditions:Logic Type | Example |
---|---|
AND (use space) | <hr wwpage:condition=”header-exists company-email-exists” /> |
OR (use “,”) | <hr wwpage:condition=”header-exists,footer-exists” /> |
NOT (use “!”) | <hr wwpage:condition=”!header-exists” /> |
AND with OR and NOT | <hr wwpage:condition=”header-exists company-email-exists,footer-exists !company-email-exists” /> |
wwpage:attribute-<name> attribute can be used to specify several behaviors when working with URL and File paths. The following shows the list of available modifiers for this wwpage:attribute.
Attribute Modifier | Example |
---|---|
relative-to-output | <script type="text/javascript" src="scripts/common.js" wwpage:attribute-src="relative-to-output"></script> |
copy-relative-to-output | <script type="text/javascript" src="scripts/common.js" wwpage:attribute-src="copy-relative-to-output"></script> |
relative-to-output-root | <script type="text/javascript" src="scripts/common.js" wwpage:attribute-src="relative-to-output-root"></script> |
copy-relative-to-output-root | <script type="text/javascript" src="scripts/common.js" wwpage:attribute-src="copy-relative-to-output-root"></script> |
absolute-to-output | <external-graphic content-height="scale-to-fit" width="1in" height="1in" src="url('{wwformat:Pages/images/Logo.png}')" wwpage:attribute-src="absolute-to-output" /> |
resolved-uri | <external-graphic src="url({wwformat:Pages/images/rms_doc_logo.png})" wwpage:attribute-src="resolved-uri" content-width="100px" content-height="100px" left="0pt" top="0pt" /> |
resolved-path | <external-graphic src="{wwformat:Pages/images/rms_doc_logo.png}" wwpage:attribute-src="resolved-path" content-width="100px" content-height="100px" left="0pt" top="0pt" /> |
img
tag, demonstrating how “{}” characters can be used to improve the result of the replacement.<img src="url('{images/logo.png}')" wwpage:attribute-src="copy-relative-to-output" />.