Going way beyond HTML
Fiddling With Advanced BLUEPHRASE
Using CSS
Styling rules can be added to BLUEPHRASE documents using shorthand notation, inline style
tags, or externally linked stylesheets.
- Defining styling rules
- Using a
style
block to define decoration rules. - Linking to external stylesheets
- Using an external file as a CSS stylesheet.
- Including external stylesheets
- Embedding the contents of an external file into a
style
block. - Styling a single phrase
- Applying unique styling directly to phrases.
Using JavaScript
Scripts can be embedded using inline script
tags or external sourcerefs.
- Embedding scripts
- Using a
script
block to add JavaScript functions to a document. - Linking to external scripts
- Using an external file that contains JavaScript functions.
- Including external scripts
- Embedding the contents of an external file into a
script
block.
Assembling Documents
A document can be assembled from two or more BLUEPHRASE source files by using an !include
pragma.
- Including other manuscripts
- Using the
!include
pragma to embed other BLUEPHRASE text. - Including other documents
- Using the
!include
pragma to embed an HTML document. - Including other text
- Using the
!include
pragma to embed plain text.
Enclosure Templates
Enclosures provide a way to wrap the contents of a document with the outer contents of an external file.
- Defining a classic template
- Creating a BLUEPHRASE template with a
!target-matter
enclosure point. - Using an enclosure
- Using the
!enclosure
pragma to wrap the classic template around a manuscript. - Semantax enclosures
- Triggering an enclosure on every occurrence of a specified semantax.
- Classname enclosures
- Triggering an enclosure on each phrase having a specified classname.
- Identifier enclosures
- Triggering an enclosure for a phrase with the specified ID.
Declaring and using variables
BLUEPHRASE uses the dollar sign for variables and sequencers.
- Text variables
- Declaring and using text variables.
- Attribute variables
- Using variables inside shorthand attributes.
- Sequencing variables
- Declaring sequencers for use as automatic incrementors.
- Alternate numbering schemes
- Formatting sequencers with other counting methods.
- Saving variable values
- Saving a copy of a variable and using it to restore its value when needed.
Clones
BLUEPHRASE also uses the dollar sign for inner clones and outer clones.
- Inner clones
- Using inner clones to copy the inner phrases only.
- Outer clones
- Using outer clones to copy a phrase and its complete phrase hierarchy.
Unplaced manuscripts
The use
pragma allows externally defined variables to be used within a BLUEPHRASE manuscript.
- Unplaced phrases and variables
- Defining phrases and variables for use elsewhere.
- Declaring phrases just for clones
- Using a
!use
pragma to include a hidden phrase hierarchy for later cloning. - Using an invisible manuscript
- Using the
!use
pragma to inject variables and clone templates into the BLUEPROCESSOR.
Bidirectional hyperlinks
Junctors allow hyperlinks to be defined in a bidirectional manner.
- Infix junctors
- Creating complementary links from A->B and B->A.
- Prefix junctors
- Placing the B->A hyperlink before the target phrase.
- Postfix junctors
- Placing the B->A hyperlink after the target phrase.
- Half-duplex junctors
- Using junctor syntax to conveniently link B->A in one direction only.
- Multiplex junctors
- Using junctor syntax to link multiple sources to a single destination B->A, C->A, D->A, etc.
Dialogs & components
User interaction can be scripted with dialog boxes and with web components.
- Defining a dialog box
- Selectively showing or hiding a form using JavaScript.
- Component templates
- Creating a web component template.