SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
XML Binding Language
This talk describes the XBL 2.0 Specification:
 http://www.w3.org/TR/xbl/
 htt //           /TR/ bl/
What is XBL2?
XBL Elements 
Binding attachment and detachment 
      g
Shadow Content
Implementations  and inheritance
Event handlers 
DOM Interfaces
Redundant semantic free mark‐up (div 
elements, for example)
elements  for example)
Hard to add new interfaces/methods to 
elements
 l
Hard to capture events, particularly modified 
           p            p          y
key events
Hard to move content in a document, 
especially from one medium to another
Log on Widget (minimal markup)

<form action=quot;#examplequot; method=quot;postquot; id=quot;loginWidgetquot;> 
<fieldset> 
    <legend>Log on</legend> 
    <label for=quot;usernameFieldquot;>Username:</label> 
    <input name=quot;usernamequot; type=quot;textquot;/> 
    <label for=quot;passwordFieldquot;>Password:</label> 
    <input type=quot;passwordquot; name=quot;passwordquot;/> 
    <input name=quot;submitquot; type=quot;submitquot;/> 
       p                   yp
</fieldset> 
</form>
No enough structure
    Actual Markup needed for design:
<form action=quot;#examplequot; method=quot;postquot; id=quot;loginWidgetquot;>
<fieldset> <legend>Log in</legend> 
<div id=quot;loginBoxFieldsquot;> 
     <div class= fieldGroup > 
     <div class=quot;fieldGroupquot;> 
            <label for=quot;usernameFieldquot; >Username:</label> 
            <input name=quot;usernamequot; type=quot;textquot; id=quot;usernameFieldquot; value=quot;quot;/> 
     </div> 
     <div class=quot;fieldGroupquot;> 
            <label for=quot;passwordFieldquot;>Password:</label> 
            <label for= passwordField >Password:</label> 
            <input type=quot;passwordquot; id=quot;passwordFieldquot; name=quot;passwordquot; value=quot;quot;/> 
     </div> 
</div> 
<div class=quot;actionsContainerquot;> 
     <div class=quot;inputButtonsquot;> 
     <div class= inputButtons > 
            <input name=quot;submitquot; type=quot;submit“ class=quot;submitButtonquot; value=quot;Submitquot; /> 
     </div> 
</div> 
</fieldset> 
</form> 
Designers need 2x the markup to achieve a 
design
Markup needs to be polluted with 
semantically neutral div elements
           ll        ld l
XBL can fix this... And make the whole thing 
                                           g
better to use. 
DOM‐Based binding language
Used to override (or enhance) standard 
behaviour and presentation of DOM elements
Lets you: 
     y
 Add/move/replace/restyle content
 Add DOM interfaces to elements
 Add new styles
 Add event listeners
 Preload media
No implementations yet
HTML documents
 Add accessibility, enhance behaviour and 
 Add        ibilit   h      b h i   d 
 aesthetics
Multimedia 
M l i di  
 Add functionality 
 Bring elements to life
Binding            Global Attributes
  Implementation
    p e e tat o     xbl:pseudo
                     b pseudo
                     ▪ For CSS pseudo selectors
  Template
                    xbl:attr
  ▪ Content
  ▪ div              ▪ For forwarding attributes
  ▪ Inherited
  Resources
  ▪ Prefetch
  ▪ Style
  Handlers
  ▪ Handler
Script
Same as HTML script   <script>
Declare global          var c = 0; 
functions               function magic(a,b ){
Scoped to the XBL            return a + b   c; 
                             return a + b * c; 
document              }
                      </script?>
Allows you to define a binding:
 How it behaves  
 H  it b h
 If it extends other bindings (inheritance model will 
 be discussed later)
 What content it adds when bound to another 
 element
 What resources it uses
Allows you to add new             <binding element=“h1”>
DOM interfaces                      <implementation>
  Define new functionality for      ({
  an object                             this.makeRed() =function(){
  Define event handlers                    }, 
                                           } 
  Define properties and fields            this.onclick(e) = function{
                                           this.makeRed();
                                        }
                                    })
                                    </implementation>
                                      /implementation
                                  </binding>
                                  ...
                                  <h1>
Template                         <binding id=“reshuffle”>
                                 <template>
  Contains a template of the 
                 p
                                  <content includes=“b”/>
  content to be inserted into 
  a document                     <content includes=“a”/>
Content                          </template>
  Inserts the “selected”         </binding>
  content of a bound             ....
  element
   l      t
                                 <div id=“homepage”>
  You can only use a selected 
                                 <h1 id=“a”>Welcome!</h1>
  element once. 
                                 <h2 id=“b”>Marcos’ 
                                   h  id “b” M      ’ 
The resulting DOM tree 
                                     page</h1>
is called shadow content 
                                 </div>
DIV                                   <binding extends=“reshuffle”>
                                          <template>
  Used as a general container 
                                          <div state=“idle”>
  mechanism (like HTML div) 
                                               <inherited>
  Has a “state” attribute
Inherited                                      <h1>
                                               no one’s homepage
  Used to insert the content of an 
                                               </h1>
  extended binding into another 
  binding.                                     </inherited>
                                          <div>
                                          </template>
                                                p
                                      <resources> 
                                          <style> 
                                          div[state=idle]{
                                               color: yellow; 
                                          }
                                          </style>
                                      </ resources>
                                      </binding>
Resources                       <binding>
                                <resources>
                                  esou ces
  Structural container
                                   <style>
Style
                                   button:active{ 
  Styles applied to a binding
    y     pp                g
                                   border: solid red;
  Author sheet styles can 
                                   background: url(fancy.png);
  also be applied to a 
  binding
  bi di                            }
Prefetch                           </style>
  Primes the cache                 <prefetch src=“fancy.png”/>
                                        fh        “f       ”/
                                </resources>
                                </binding>
Allows you to group event           The bound document is:
handlers
Trap DOM events and re‐route 
   p                                <hotspot message=quot;Hello Worldquot;> 
                                          p          g
them to functions defined in the    <instruction> 
<implementation>                    Activate this text. 
Fine‐grained control over           </instruction>
keyboard and mouse events           </hotspot> 
                                    The binding is:
                                    <binding> 
                                           g
                                    <handlers> 
                                    <handler event=quot;clickquot;>
                                    alert(
                                    event.currentTarget.getAttribute(
                                    event currentTarget getAttribute(
                                    'message' )); 
                                    </handler> 
                                    </handlers> 
                                    </binding>
id               key
event            key‐location
                 key location
phase            text
trusted          prev‐value
                 prev value
propagate        new‐value
default action
default‐action   attr name
                 attr‐name
button           attr‐change 
click‐count
click count
modifiers
Document attachment                             Binding Detachment
                                                 Element.removeBinding(URI)
 Processing Instruction
 ▪ <?xbl href=quot;foo.xmlquot;?>
 New DOM interface
 ▪   document.loadBindingDocument('foo.xml');


Element Attachment
 CSS
 ▪ ‐xbl‐binding: url(quot;foo.xmlquot;)
              g     (         )
 Binding element
 ▪ <binding element=quot;#xquot;>
          g
Explicit inheritance 
Implicit inheritance

Más contenido relacionado

La actualidad más candente

Symfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODMSymfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODMJonathan Wage
 
Java script Advance
Java script   AdvanceJava script   Advance
Java script AdvanceJaya Kumari
 
Render Caching for Drupal 8
Render Caching for Drupal 8Render Caching for Drupal 8
Render Caching for Drupal 8John Doyle
 
jQuery and_drupal
jQuery and_drupaljQuery and_drupal
jQuery and_drupalBlackCatWeb
 
PHPConf-TW 2012 # Twig
PHPConf-TW 2012 # TwigPHPConf-TW 2012 # Twig
PHPConf-TW 2012 # TwigWake Liu
 
Vue.js - zastosowanie i budowa komponentów
Vue.js - zastosowanie i budowa komponentówVue.js - zastosowanie i budowa komponentów
Vue.js - zastosowanie i budowa komponentówLaravel Poland MeetUp
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal DevelopmentJeff Eaton
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginningAnis Ahmad
 
JavaScript DOM Manipulations
JavaScript DOM ManipulationsJavaScript DOM Manipulations
JavaScript DOM ManipulationsYnon Perek
 
Template-based Modular Architecture
Template-based Modular ArchitectureTemplate-based Modular Architecture
Template-based Modular Architecturegenify
 
JSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLJSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLseleciii44
 

La actualidad más candente (16)

Symfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODMSymfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODM
 
Java script Advance
Java script   AdvanceJava script   Advance
Java script Advance
 
Render Caching for Drupal 8
Render Caching for Drupal 8Render Caching for Drupal 8
Render Caching for Drupal 8
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Get AngularJS Started!
Get AngularJS Started!Get AngularJS Started!
Get AngularJS Started!
 
jQuery and_drupal
jQuery and_drupaljQuery and_drupal
jQuery and_drupal
 
PHPConf-TW 2012 # Twig
PHPConf-TW 2012 # TwigPHPConf-TW 2012 # Twig
PHPConf-TW 2012 # Twig
 
Vue.js - zastosowanie i budowa komponentów
Vue.js - zastosowanie i budowa komponentówVue.js - zastosowanie i budowa komponentów
Vue.js - zastosowanie i budowa komponentów
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
Basic JSTL
Basic JSTLBasic JSTL
Basic JSTL
 
Drupal Development
Drupal DevelopmentDrupal Development
Drupal Development
 
jQuery from the very beginning
jQuery from the very beginningjQuery from the very beginning
jQuery from the very beginning
 
JavaScript DOM Manipulations
JavaScript DOM ManipulationsJavaScript DOM Manipulations
JavaScript DOM Manipulations
 
Template-based Modular Architecture
Template-based Modular ArchitectureTemplate-based Modular Architecture
Template-based Modular Architecture
 
JSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLJSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTL
 

Similar a XML Binding Language 2.0

Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalystsvilen.ivanov
 
TurboGears2 Pluggable Applications
TurboGears2 Pluggable ApplicationsTurboGears2 Pluggable Applications
TurboGears2 Pluggable ApplicationsAlessandro Molina
 
Introduction to Vue.js
Introduction to Vue.jsIntroduction to Vue.js
Introduction to Vue.jsMeir Rotstein
 
Drupal Javascript for developers
Drupal Javascript for developersDrupal Javascript for developers
Drupal Javascript for developersDream Production AG
 
jQuery (BostonPHP)
jQuery (BostonPHP)jQuery (BostonPHP)
jQuery (BostonPHP)jeresig
 
Functional FIPS: Learning PHP for Drupal Theming
Functional FIPS: Learning PHP for Drupal ThemingFunctional FIPS: Learning PHP for Drupal Theming
Functional FIPS: Learning PHP for Drupal ThemingEmma Jane Hogbin Westby
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript FrameworkAll Things Open
 
Introduction to web components
Introduction to web componentsIntroduction to web components
Introduction to web componentsMarc Bächinger
 
D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - LondonMarek Sotak
 
jQuery (MeshU)
jQuery (MeshU)jQuery (MeshU)
jQuery (MeshU)jeresig
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkIndicThreads
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Frameworkvhazrati
 
Modern frontend development with VueJs
Modern frontend development with VueJsModern frontend development with VueJs
Modern frontend development with VueJsTudor Barbu
 
The new static resources framework
The new static resources frameworkThe new static resources framework
The new static resources frameworkmarcplmer
 
Grok Drupal (7) Theming
Grok Drupal (7) ThemingGrok Drupal (7) Theming
Grok Drupal (7) ThemingPINGV
 

Similar a XML Binding Language 2.0 (20)

Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalyst
 
TurboGears2 Pluggable Applications
TurboGears2 Pluggable ApplicationsTurboGears2 Pluggable Applications
TurboGears2 Pluggable Applications
 
Polymer
PolymerPolymer
Polymer
 
Introduction to Vue.js
Introduction to Vue.jsIntroduction to Vue.js
Introduction to Vue.js
 
Drupal Javascript for developers
Drupal Javascript for developersDrupal Javascript for developers
Drupal Javascript for developers
 
jQuery (BostonPHP)
jQuery (BostonPHP)jQuery (BostonPHP)
jQuery (BostonPHP)
 
Functional FIPS: Learning PHP for Drupal Theming
Functional FIPS: Learning PHP for Drupal ThemingFunctional FIPS: Learning PHP for Drupal Theming
Functional FIPS: Learning PHP for Drupal Theming
 
Polymer 1.0
Polymer 1.0Polymer 1.0
Polymer 1.0
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript Framework
 
Introduction to web components
Introduction to web componentsIntroduction to web components
Introduction to web components
 
D7 theming what's new - London
D7 theming what's new - LondonD7 theming what's new - London
D7 theming what's new - London
 
jQuery (MeshU)
jQuery (MeshU)jQuery (MeshU)
jQuery (MeshU)
 
Overview Of Lift Framework
Overview Of Lift FrameworkOverview Of Lift Framework
Overview Of Lift Framework
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web Framework
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Framework
 
Modern frontend development with VueJs
Modern frontend development with VueJsModern frontend development with VueJs
Modern frontend development with VueJs
 
The new static resources framework
The new static resources frameworkThe new static resources framework
The new static resources framework
 
Web 6 | JavaScript DOM
Web 6 | JavaScript DOMWeb 6 | JavaScript DOM
Web 6 | JavaScript DOM
 
Knockout.js
Knockout.jsKnockout.js
Knockout.js
 
Grok Drupal (7) Theming
Grok Drupal (7) ThemingGrok Drupal (7) Theming
Grok Drupal (7) Theming
 

Último

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

XML Binding Language 2.0

  • 2. This talk describes the XBL 2.0 Specification: http://www.w3.org/TR/xbl/ htt // /TR/ bl/ What is XBL2? XBL Elements  Binding attachment and detachment  g Shadow Content Implementations  and inheritance Event handlers  DOM Interfaces
  • 4. Log on Widget (minimal markup) <form action=quot;#examplequot; method=quot;postquot; id=quot;loginWidgetquot;>  <fieldset>  <legend>Log on</legend>  <label for=quot;usernameFieldquot;>Username:</label>  <input name=quot;usernamequot; type=quot;textquot;/>  <label for=quot;passwordFieldquot;>Password:</label>  <input type=quot;passwordquot; name=quot;passwordquot;/>  <input name=quot;submitquot; type=quot;submitquot;/>  p yp </fieldset>  </form>
  • 5. No enough structure Actual Markup needed for design: <form action=quot;#examplequot; method=quot;postquot; id=quot;loginWidgetquot;> <fieldset> <legend>Log in</legend>  <div id=quot;loginBoxFieldsquot;>  <div class= fieldGroup >  <div class=quot;fieldGroupquot;>  <label for=quot;usernameFieldquot; >Username:</label>  <input name=quot;usernamequot; type=quot;textquot; id=quot;usernameFieldquot; value=quot;quot;/>  </div>  <div class=quot;fieldGroupquot;>  <label for=quot;passwordFieldquot;>Password:</label>  <label for= passwordField >Password:</label>  <input type=quot;passwordquot; id=quot;passwordFieldquot; name=quot;passwordquot; value=quot;quot;/>  </div>  </div>  <div class=quot;actionsContainerquot;>  <div class=quot;inputButtonsquot;>  <div class= inputButtons >  <input name=quot;submitquot; type=quot;submit“ class=quot;submitButtonquot; value=quot;Submitquot; />  </div>  </div>  </fieldset>  </form> 
  • 7. DOM‐Based binding language Used to override (or enhance) standard  behaviour and presentation of DOM elements Lets you:  y Add/move/replace/restyle content Add DOM interfaces to elements Add new styles Add event listeners Preload media No implementations yet
  • 8. HTML documents Add accessibility, enhance behaviour and  Add  ibilit   h  b h i   d  aesthetics Multimedia  M l i di   Add functionality  Bring elements to life
  • 9.
  • 10.
  • 11.
  • 12. Binding Global Attributes Implementation p e e tat o xbl:pseudo b pseudo ▪ For CSS pseudo selectors Template xbl:attr ▪ Content ▪ div ▪ For forwarding attributes ▪ Inherited Resources ▪ Prefetch ▪ Style Handlers ▪ Handler Script
  • 13. Same as HTML script <script> Declare global  var c = 0;  functions function magic(a,b ){ Scoped to the XBL  return a + b   c;  return a + b * c;  document } </script?>
  • 14. Allows you to define a binding: How it behaves   H  it b h If it extends other bindings (inheritance model will  be discussed later) What content it adds when bound to another  element What resources it uses
  • 15. Allows you to add new  <binding element=“h1”> DOM interfaces <implementation> Define new functionality for  ({ an object this.makeRed() =function(){ Define event handlers },  }  Define properties and fields this.onclick(e) = function{ this.makeRed(); } }) </implementation> /implementation </binding> ... <h1>
  • 16. Template <binding id=“reshuffle”> <template> Contains a template of the  p <content includes=“b”/> content to be inserted into  a document <content includes=“a”/> Content </template> Inserts the “selected”  </binding> content of a bound  .... element l t <div id=“homepage”> You can only use a selected  <h1 id=“a”>Welcome!</h1> element once.  <h2 id=“b”>Marcos’  h  id “b” M ’  The resulting DOM tree  page</h1> is called shadow content  </div>
  • 17. DIV <binding extends=“reshuffle”> <template> Used as a general container  <div state=“idle”> mechanism (like HTML div)  <inherited> Has a “state” attribute Inherited <h1> no one’s homepage Used to insert the content of an  </h1> extended binding into another  binding.  </inherited> <div> </template> p <resources>  <style>  div[state=idle]{ color: yellow;  } </style> </ resources> </binding>
  • 18. Resources <binding> <resources> esou ces Structural container <style> Style button:active{  Styles applied to a binding y pp g border: solid red; Author sheet styles can  background: url(fancy.png); also be applied to a  binding bi di } Prefetch </style> Primes the cache <prefetch src=“fancy.png”/> fh “f ”/ </resources> </binding>
  • 19. Allows you to group event  The bound document is: handlers Trap DOM events and re‐route  p <hotspot message=quot;Hello Worldquot;>  p g them to functions defined in the  <instruction>  <implementation> Activate this text.  Fine‐grained control over  </instruction> keyboard and mouse events </hotspot>  The binding is: <binding>  g <handlers>  <handler event=quot;clickquot;> alert( event.currentTarget.getAttribute( event currentTarget getAttribute( 'message' ));  </handler>  </handlers>  </binding>
  • 20. id key event key‐location key location phase text trusted prev‐value prev value propagate new‐value default action default‐action attr name attr‐name button attr‐change  click‐count click count modifiers
  • 21. Document attachment Binding Detachment Element.removeBinding(URI) Processing Instruction ▪ <?xbl href=quot;foo.xmlquot;?> New DOM interface ▪ document.loadBindingDocument('foo.xml'); Element Attachment CSS ▪ ‐xbl‐binding: url(quot;foo.xmlquot;) g ( ) Binding element ▪ <binding element=quot;#xquot;> g