SlideShare a Scribd company logo
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?

More Related Content

What's hot

J query1
J query1J query1
J query1
Manav Prasad
 
J query
J queryJ query
J query
Manav Prasad
 
Php verses MySQL
Php verses MySQLPhp verses MySQL
Php verses MySQL
CBitss Technologies
 
Week3
Week3Week3
Xml 2
Xml  2 Xml  2
Jiemamy inside 2
Jiemamy inside 2Jiemamy inside 2
Jiemamy inside 2
都元ダイスケ Miyamoto
 
jQuery
jQueryjQuery
Creating a database
Creating a databaseCreating a database
Creating a database
Rahul Gupta
 
MySQL
MySQLMySQL
Json Persistence Framework
Json Persistence FrameworkJson Persistence Framework
Json Persistence Framework
danieloskarsson
 
How to search extracted data
How to search extracted dataHow to search extracted data
How to search extracted data
Javier Collado
 
Jquery introduction
Jquery introductionJquery introduction
Jquery introduction
musrath mohammad
 
MongoDB and RDBMS
MongoDB and RDBMSMongoDB and RDBMS
MongoDB and RDBMS
francescapasha
 
Quebec pdo
Quebec pdoQuebec pdo
Quebec pdo
Valentine Dianov
 
MySql:Introduction
MySql:IntroductionMySql:Introduction
MySql:Introduction
DataminingTools Inc
 
jQuery
jQueryjQuery
jQuery
Jay Poojara
 

What's hot (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
 

Viewers also liked

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 statement
artba
 
Trabajo profe coral
Trabajo profe coralTrabajo profe coral
Trabajo profe coral
Patricia Bojacá
 
Mongrel
MongrelMongrel
Xogos matemáticos
Xogos matemáticosXogos matemáticos
Xogos matemáticos
colecabalo
 
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 java
elrira25
 
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
Regina Franco
 
Frasesvastagalarza
FrasesvastagalarzaFrasesvastagalarza
Frasesvastagalarza
RocioFernanda123
 
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
Sagradocorazontorrealhaquime
 

Viewers also liked (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
 

Similar to 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
 
DB2 Native XML
DB2 Native XMLDB2 Native XML
DB2 Native XML
Amol Pujari
 
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
Anton Keks
 
XML-Javascript
XML-JavascriptXML-Javascript
XML-Javascript
tutorialsruby
 
XML-Javascript
XML-JavascriptXML-Javascript
XML-Javascript
tutorialsruby
 
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 Perl
Geir 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 Ruby
sbeam
 
XSLT 3.0 - new features
XSLT 3.0 - new featuresXSLT 3.0 - new features
XSLT 3.0 - new features
Jakub Malý
 
Service Oriented Architecture - Unit II
Service Oriented Architecture - Unit IIService Oriented Architecture - Unit II
Service Oriented Architecture - Unit II
Roselin Mary S
 
Xml presentation
Xml presentationXml presentation
Xml presentation
Miguel Angel Teheran Garcia
 
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
Tara Athan
 
Lobos Introduction
Lobos IntroductionLobos Introduction
Lobos Introduction
Nicolas Buduroi
 
Dax Declarative Api For Xml
Dax   Declarative Api For XmlDax   Declarative Api For Xml
Dax Declarative Api For Xml
Lars 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 Templates
Thomas Weinert
 
XML_schema_Structure
XML_schema_StructureXML_schema_Structure
XML_schema_Structure
Vijay Kumar Verma
 
PostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL SuperpowersPostgreSQL's Secret NoSQL Superpowers
PostgreSQL's Secret NoSQL Superpowers
Amanda Gilmore
 
Broadleaf Presents Thymeleaf
Broadleaf Presents ThymeleafBroadleaf Presents Thymeleaf
Broadleaf Presents Thymeleaf
Broadleaf Commerce
 
Introduction of xml and xslt
Introduction of xml and xsltIntroduction of xml and xslt
Introduction of xml and xslt
TUSHAR VARSHNEY
 

Similar to 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
 

More from elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
elliando 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 ClojureScript
elliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
elliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
elliando dias
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
elliando 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 Agility
elliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
elliando 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
 
Ragel talk
Ragel talkRagel talk
Ragel talk
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 Web
elliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
elliando dias
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
elliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
elliando dias
 
Rango
RangoRango
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
elliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
elliando dias
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
elliando 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 Facebook
elliando 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 Study
elliando dias
 

More from 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
 

Recently uploaded

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 

Recently uploaded (20)

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 

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?