SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Downloaden Sie, um offline zu lesen
SXML:
S-expression eXtensible Markup Language




          by Sterling Stuart Stein
Manipulating XML
●   Many ways to manipulate XML
    –   PHP
    –   JavaScript
    –   XSLT
●   Many annoyances
    –   Print statements (is it well-formed?)
    –   Lack of safety (Stray ampersands?)
    –   Verbose commands
PHP example
        <?php
Echo:    echo '<tag attr="val">';
         echo 'data';
         echo '</tag>';
        ?>


        <?php
         $doc = new DomDocument('1.0');
DOM:     $root = $doc->createElement('tag');
         $root->set_attribute("attr","val");
         $doc->appendChild($root);
         $value = $doc->createTextNode('data');
         $root->appendChild($value);
         echo $doc->dump_mem();
        ?>
              JavaScript is similar.
XSLT
                          <xsl:template match="/">
   Can have literals:      <tag attr="val">
                            <xsl:text>data</xsl:text>
                           </tag>
                          </xsl:template>




                          <tag>
                           <xsl:attribute name="attr">
Hard to add attributes:     <xsl:text>val</xsl:text>
                           </xsl:attribute>
                          </tag>
XSLT 2
                 Verbose function call syntax:
                 navitem("val1","val2");
      <xsl:call-template name="navitem">
       <xsl:with-param name="param1" select="'val1'" />
       <xsl:with-param name="param2" select="'val2'" />
      </xsl:call-template>

                         Hard to extend:
                         grouping
<xsl:key name="group-by-surname" match="contact" use="surname" />
<xsl:template match="records">
 <xsl:for-each select="contact[count(. | key('contacts-by-surname', surname)[1]) =
1]">
  <xsl:sort select="surname" />
  <xsl:value-of select="surname" />,<br />
  <xsl:for-each select="key('group-by-surname', surname)">
  <xsl:sort select="forename" />
  <xsl:value-of select="forename" /> (<xsl:value-of select="title" />)<br />
  </xsl:for-each>
 </xsl:for-each>
</xsl:template>
S-expressions
●   Stands for symbolic expression
●   Fully parenthesized parse tree
●   Usually uses prefix notation
    –   1+2*3 = (+ 1 (* 2 3))
●   Used to represent data and code in LISP
S-expressions and XML
●   S-expressions and XML represent parse trees
●   LISP can modify S-expressions
●   Therefore, use LISP on XML = SXML
●   Goal is to have uniform interfaces
●   Mapping from XML to S-expressions:
    <tag attr="val">   ("tag" (("attr"."val"))
     Data               "Data"
     <inside />         ("inside" ())
    </tag>             )
Features
           Quasiquotes make having
           executable snippets easy:
`("div" (("id"."nav"))            Similar to:
 ,(navitem "link" "dest")         <?php ...code... ?>
 ,@morenodes                      but safer.
 )


         Attributes can be dealt with
         the same as everything else:
        `("div"
          (("class".,(if (here) "active" "inactive")))
         )
Features 2
●   Has transforms that are XSLT-like
●   Has sorting by multiple criteria and grouping
●   Has path matching
    –   Currently far inferior to XSLT
    –   Planning on path like: table/tr = (* "table" "tr")
●   Will have SQL interface
    –   Also specified as S-expressions through macros
    –   Possibly with type safety to protect from SQL injection
        attacks
    –   Results returned as SXML trees
Implementation
●   Implemented as a library for Bigloo Scheme
●   Allows for native compiling
    –   Runs fast
●   Safe for CGI
    –   String lengths checked by language
    –   SQL checked by macros
●   Avoids destructive functions
    –   Personal preference
    –   Not suitable for huge documents
Thank you!




 Any questions?
Any suggestions?

Weitere ähnliche Inhalte

Was ist angesagt? (16)

J query1
J query1J query1
J query1
 
J query
J queryJ query
J query
 
Php verses MySQL
Php verses MySQLPhp verses MySQL
Php verses MySQL
 
Week3
Week3Week3
Week3
 
Xml 2
Xml  2 Xml  2
Xml 2
 
Jiemamy inside 2
Jiemamy inside 2Jiemamy inside 2
Jiemamy inside 2
 
jQuery
jQueryjQuery
jQuery
 
Creating a database
Creating a databaseCreating a database
Creating a database
 
MySQL
MySQLMySQL
MySQL
 
Json Persistence Framework
Json Persistence FrameworkJson Persistence Framework
Json Persistence Framework
 
How to search extracted data
How to search extracted dataHow to search extracted data
How to search extracted data
 
Jquery introduction
Jquery introductionJquery introduction
Jquery introduction
 
MongoDB and RDBMS
MongoDB and RDBMSMongoDB and RDBMS
MongoDB and RDBMS
 
Quebec pdo
Quebec pdoQuebec pdo
Quebec pdo
 
MySql:Introduction
MySql:IntroductionMySql:Introduction
MySql:Introduction
 
jQuery
jQueryjQuery
jQuery
 

Andere mochten auch

Nutrición y salud.
Nutrición  y salud. Nutrición  y salud.
Nutrición y salud. Benitez1013
 
June 11 ARTBA T&I wotus hearing statement
June 11 ARTBA T&I wotus hearing statementJune 11 ARTBA T&I wotus hearing statement
June 11 ARTBA T&I wotus hearing statementartba
 
Xogos matemáticos
Xogos matemáticosXogos matemáticos
Xogos matemáticoscolecabalo
 
Jpeg ads for newsletters (1)
Jpeg ads for newsletters (1)Jpeg ads for newsletters (1)
Jpeg ads for newsletters (1)scttsorenson
 
Trabajo sobre la web 2 voki
Trabajo sobre la web 2 voki Trabajo sobre la web 2 voki
Trabajo sobre la web 2 voki luisarendon123
 
Rinoceron de java
Rinoceron de javaRinoceron de java
Rinoceron de javaelrira25
 
Ayuda memoria-para-los-mas-que-senescentes
Ayuda memoria-para-los-mas-que-senescentesAyuda memoria-para-los-mas-que-senescentes
Ayuda memoria-para-los-mas-que-senescentesRegina Franco
 

Andere mochten auch (12)

Nutrición y salud.
Nutrición  y salud. Nutrición  y salud.
Nutrición y salud.
 
June 11 ARTBA T&I wotus hearing statement
June 11 ARTBA T&I wotus hearing statementJune 11 ARTBA T&I wotus hearing statement
June 11 ARTBA T&I wotus hearing statement
 
Trabajo profe coral
Trabajo profe coralTrabajo profe coral
Trabajo profe coral
 
Mongrel
MongrelMongrel
Mongrel
 
Xogos matemáticos
Xogos matemáticosXogos matemáticos
Xogos matemáticos
 
Jpeg ads for newsletters (1)
Jpeg ads for newsletters (1)Jpeg ads for newsletters (1)
Jpeg ads for newsletters (1)
 
Trabajo sobre la web 2 voki
Trabajo sobre la web 2 voki Trabajo sobre la web 2 voki
Trabajo sobre la web 2 voki
 
Rinoceron de java
Rinoceron de javaRinoceron de java
Rinoceron de java
 
Ayuda memoria-para-los-mas-que-senescentes
Ayuda memoria-para-los-mas-que-senescentesAyuda memoria-para-los-mas-que-senescentes
Ayuda memoria-para-los-mas-que-senescentes
 
Frasesvastagalarza
FrasesvastagalarzaFrasesvastagalarza
Frasesvastagalarza
 
Proyecto guía la torre 1 y 2 eso
Proyecto guía la torre 1 y 2 esoProyecto guía la torre 1 y 2 eso
Proyecto guía la torre 1 y 2 eso
 
Switching oct2013
Switching oct2013Switching oct2013
Switching oct2013
 

Ähnlich wie SXML: S-expression eXtensible Markup Language

XSLT and XPath - without the pain!
XSLT and XPath - without the pain!XSLT and XPath - without the pain!
XSLT and XPath - without the pain!Bertrand Delacretaz
 
Java Course 12: XML & XSL, Web & Servlets
Java Course 12: XML & XSL, Web & ServletsJava Course 12: XML & XSL, Web & Servlets
Java Course 12: XML & XSL, Web & ServletsAnton Keks
 
eXtensible Markup Language (XML)
eXtensible Markup Language (XML)eXtensible Markup Language (XML)
eXtensible Markup Language (XML)Serhii Kartashov
 
XML Tools for Perl
XML Tools for PerlXML Tools for Perl
XML Tools for PerlGeir Aalberg
 
No SQL, No problem - using MongoDB in Ruby
No SQL, No problem - using MongoDB in RubyNo SQL, No problem - using MongoDB in Ruby
No SQL, No problem - using MongoDB in Rubysbeam
 
XSLT 3.0 - new features
XSLT 3.0 - new featuresXSLT 3.0 - new features
XSLT 3.0 - new featuresJakub Malý
 
Service Oriented Architecture - Unit II
Service Oriented Architecture - Unit IIService Oriented Architecture - Unit II
Service Oriented Architecture - Unit IIRoselin Mary S
 
Syntax Reuse: XSLT as a Metalanguage for Knowledge Representation Languages
Syntax Reuse: XSLT as a Metalanguage for Knowledge Representation LanguagesSyntax Reuse: XSLT as a Metalanguage for Knowledge Representation Languages
Syntax Reuse: XSLT as a Metalanguage for Knowledge Representation LanguagesTara Athan
 
Dax Declarative Api For Xml
Dax   Declarative Api For XmlDax   Declarative Api For Xml
Dax Declarative Api For XmlLars Trieloff
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Sumant Tambe
 
The Lumber Mill Xslt For Your Templates
The Lumber Mill   Xslt For Your TemplatesThe Lumber Mill   Xslt For Your Templates
The Lumber Mill Xslt For Your TemplatesThomas Weinert
 
PostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL SuperpowersPostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL SuperpowersAmanda Gilmore
 
Introduction of xml and xslt
Introduction of xml and xsltIntroduction of xml and xslt
Introduction of xml and xsltTUSHAR VARSHNEY
 

Ähnlich wie SXML: S-expression eXtensible Markup Language (20)

XSLT and XPath - without the pain!
XSLT and XPath - without the pain!XSLT and XPath - without the pain!
XSLT and XPath - without the pain!
 
DB2 Native XML
DB2 Native XMLDB2 Native XML
DB2 Native XML
 
Java Course 12: XML & XSL, Web & Servlets
Java Course 12: XML & XSL, Web & ServletsJava Course 12: XML & XSL, Web & Servlets
Java Course 12: XML & XSL, Web & Servlets
 
XML-Javascript
XML-JavascriptXML-Javascript
XML-Javascript
 
XML-Javascript
XML-JavascriptXML-Javascript
XML-Javascript
 
eXtensible Markup Language (XML)
eXtensible Markup Language (XML)eXtensible Markup Language (XML)
eXtensible Markup Language (XML)
 
XML Tools for Perl
XML Tools for PerlXML Tools for Perl
XML Tools for Perl
 
No SQL, No problem - using MongoDB in Ruby
No SQL, No problem - using MongoDB in RubyNo SQL, No problem - using MongoDB in Ruby
No SQL, No problem - using MongoDB in Ruby
 
XSLT 3.0 - new features
XSLT 3.0 - new featuresXSLT 3.0 - new features
XSLT 3.0 - new features
 
Service Oriented Architecture - Unit II
Service Oriented Architecture - Unit IIService Oriented Architecture - Unit II
Service Oriented Architecture - Unit II
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
Syntax Reuse: XSLT as a Metalanguage for Knowledge Representation Languages
Syntax Reuse: XSLT as a Metalanguage for Knowledge Representation LanguagesSyntax Reuse: XSLT as a Metalanguage for Knowledge Representation Languages
Syntax Reuse: XSLT as a Metalanguage for Knowledge Representation Languages
 
Lobos Introduction
Lobos IntroductionLobos Introduction
Lobos Introduction
 
Dax Declarative Api For Xml
Dax   Declarative Api For XmlDax   Declarative Api For Xml
Dax Declarative Api For Xml
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)
 
The Lumber Mill Xslt For Your Templates
The Lumber Mill   Xslt For Your TemplatesThe Lumber Mill   Xslt For Your Templates
The Lumber Mill Xslt For Your Templates
 
XML_schema_Structure
XML_schema_StructureXML_schema_Structure
XML_schema_Structure
 
PostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL SuperpowersPostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL Superpowers
 
Broadleaf Presents Thymeleaf
Broadleaf Presents ThymeleafBroadleaf Presents Thymeleaf
Broadleaf Presents Thymeleaf
 
Introduction of xml and xslt
Introduction of xml and xsltIntroduction of xml and xslt
Introduction of xml and xslt
 

Mehr von elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slideselliando dias
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScriptelliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structureselliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de containerelliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduinoelliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorceryelliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Designelliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makeselliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebookelliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 

Mehr von elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Kürzlich hochgeladen

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Kürzlich hochgeladen (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

SXML: S-expression eXtensible Markup Language

  • 1. SXML: S-expression eXtensible Markup Language by Sterling Stuart Stein
  • 2. Manipulating XML ● Many ways to manipulate XML – PHP – JavaScript – XSLT ● Many annoyances – Print statements (is it well-formed?) – Lack of safety (Stray ampersands?) – Verbose commands
  • 3. PHP example <?php Echo: echo '<tag attr="val">'; echo 'data'; echo '</tag>'; ?> <?php $doc = new DomDocument('1.0'); DOM: $root = $doc->createElement('tag'); $root->set_attribute("attr","val"); $doc->appendChild($root); $value = $doc->createTextNode('data'); $root->appendChild($value); echo $doc->dump_mem(); ?> JavaScript is similar.
  • 4. XSLT <xsl:template match="/"> Can have literals: <tag attr="val"> <xsl:text>data</xsl:text> </tag> </xsl:template> <tag> <xsl:attribute name="attr"> Hard to add attributes: <xsl:text>val</xsl:text> </xsl:attribute> </tag>
  • 5. XSLT 2 Verbose function call syntax: navitem("val1","val2"); <xsl:call-template name="navitem"> <xsl:with-param name="param1" select="'val1'" /> <xsl:with-param name="param2" select="'val2'" /> </xsl:call-template> Hard to extend: grouping <xsl:key name="group-by-surname" match="contact" use="surname" /> <xsl:template match="records"> <xsl:for-each select="contact[count(. | key('contacts-by-surname', surname)[1]) = 1]"> <xsl:sort select="surname" /> <xsl:value-of select="surname" />,<br /> <xsl:for-each select="key('group-by-surname', surname)"> <xsl:sort select="forename" /> <xsl:value-of select="forename" /> (<xsl:value-of select="title" />)<br /> </xsl:for-each> </xsl:for-each> </xsl:template>
  • 6. S-expressions ● Stands for symbolic expression ● Fully parenthesized parse tree ● Usually uses prefix notation – 1+2*3 = (+ 1 (* 2 3)) ● Used to represent data and code in LISP
  • 7. S-expressions and XML ● S-expressions and XML represent parse trees ● LISP can modify S-expressions ● Therefore, use LISP on XML = SXML ● Goal is to have uniform interfaces ● Mapping from XML to S-expressions: <tag attr="val"> ("tag" (("attr"."val")) Data "Data" <inside /> ("inside" ()) </tag> )
  • 8. Features Quasiquotes make having executable snippets easy: `("div" (("id"."nav")) Similar to: ,(navitem "link" "dest") <?php ...code... ?> ,@morenodes but safer. ) Attributes can be dealt with the same as everything else: `("div" (("class".,(if (here) "active" "inactive"))) )
  • 9. Features 2 ● Has transforms that are XSLT-like ● Has sorting by multiple criteria and grouping ● Has path matching – Currently far inferior to XSLT – Planning on path like: table/tr = (* "table" "tr") ● Will have SQL interface – Also specified as S-expressions through macros – Possibly with type safety to protect from SQL injection attacks – Results returned as SXML trees
  • 10. Implementation ● Implemented as a library for Bigloo Scheme ● Allows for native compiling – Runs fast ● Safe for CGI – String lengths checked by language – SQL checked by macros ● Avoids destructive functions – Personal preference – Not suitable for huge documents
  • 11. Thank you! Any questions? Any suggestions?