•
•
•
•
•
•
TableofContents
Index
Reviews
ReaderReviews
Errata
Academic
XMLPublishingwithAxKit
ByKipHampton
Publisher :O'Reilly
PubDate :June2004
ISBN :0-596-00216-5
Pages :216
XMLPublishingwithAxKitpresentsweb
programmerstheknowledgetheyneedto
masterAxKit.Thebookfeaturesathorough
introductiontoXSP(extensibleServer
Pages),whichappliestheconceptsofServer
Pagestechnologies(embeddedcode,tag
libraries,etc)totheXMLworld,andcovers
integratingAxKitwithothertoolssuchas
TemplateToolkit,Apache::Mason,
Apache::ASP,andplainCGI.Italsoincludes
invaluablereferencesectionsonconfiguration
directives,XPathScript,andXSP.
•
•
•
•
•
•
TableofContents
Index
Reviews
ReaderReviews
Errata
Academic
XMLPublishingwithAxKit
ByKipHampton
Publisher :O'Reilly
PubDate :June2004
ISBN :0-596-00216-5
Pages :216
Copyright
Preface
WhoShouldReadThisBook
What'sInside
ConventionsUsedinThisBook
HowtoContactUs
UsingCodeExamples
Acknowledgments
Chapter1.XMLasaPublishingTechnology
Section1.1.ExplodingaFewMythsAboutXMLPublishing
Section1.2.XMLBasics
Section1.3.PublishingXMLContent
Section1.4.IntroducingAxKit,anXMLApplicationServerforApache
Chapter2.InstallingAxKit
Section2.1.InstallationRequirements
Section2.2.InstallingtheAxKitCore
Section2.4.BasicServerConfiguration
Section2.3.InstallingAxKitonWin32Systems
Section2.5.TestingtheInstallation
Section2.6.InstallationTroubleshooting
Chapter3.YourFirstXMLWebSite
Section3.1.Preparation
Section3.2.CreatingtheSourceXMLDocuments
Section3.4.AssociatingtheDocumentswiththeStylesheet
Section3.3.WritingtheStylesheet
Section3.5.AStepFurther:SyndicatingContent
Chapter4.PointsofStyle
Section4.1.AddingTransformationLanguageModules
Section4.2.DefiningStyleProcessors
Section4.3.DynamicallyChoosingStyleTransformations
Section4.4.StyleProcessorConfigurationCheatsheet
Chapter5.TransformingXMLContentwithXSLT
Section5.1.XSLTBasics
Section5.2.ABriefXSLTCookbook
Chapter6.TransformingXMLContentwithXPathScript
Section6.1.XPathScriptBasics
Section6.2.TheTemplateHash:ACloserLook
Section6.3.XPathScriptCookbook
Chapter7.ServingDynamicXMLContent
Section7.1.IntroductiontoeXtensibleServerPages
Section7.2.OtherDynamicXMLTechniques
Chapter8.ExtendingAxKit
Section8.1.AxKit'sArchitecture
Section8.2.CustomPlug-ins
Section8.4.CustomLanguageModules
Section8.3.CustomProviders
Section8.5.CustomConfigReaders
Section8.6.GettingMoreInformation
Chapter9.IntegratingAxKitwithOtherTools
Section9.1.TheTemplateToolkit
Section9.2.ProvidingContentviaApache::Filter
AppendixA.AxKitConfigurationDirectiveReference
SectionA.1.AxCacheDir
SectionA.2.AxNoCache
SectionA.3.AxDebugLevel
SectionA.4.AxTraceIntermediate
SectionA.6.AxStackTrace
SectionA.8.AxAddPlugin
SectionA.10.AxTranslateOutput
SectionA.12.AxExternalEncoding
SectionA.14.AxResetOutputTransformers
SectionA.16.AxAddXSPTaglib
SectionA.18.AxHandleDirs
SectionA.20.AxMedia
SectionA.22.AxResetStyleMap
SectionA.24.AxAddDocTypeProcessor
SectionA.26.AxAddRootProcessor
SectionA.28.AxResetProcessors
SectionA.5.AxDebugTidy
SectionA.7.AxLogDeclines
SectionA.9.AxGzipOutput
SectionA.11.AxOutputCharset
SectionA.13.AxAddOutputTransformer
SectionA.15.AxErrorStylesheet
SectionA.17.AxIgnoreStylePI
SectionA.19.AxStyle
SectionA.21.AxAddStyleMap
SectionA.23.AxAddProcessor
SectionA.25.AxAddDTDProcessor
SectionA.27.AxAddURIProcessor
SectionA.29.<AxMediaType>
SectionA.30.<AxStyleName>
Colophon
Index
Copyright©2004O'ReillyMedia,Inc.
PrintedintheUnitedStatesofAmerica.
PublishedbyO'ReillyMedia,Inc.,1005GravensteinHighway
North,Sebastopol,CA95472.
O'Reillybooksmaybepurchasedforeducational,business,or
salespromotionaluse.Onlineeditionsarealsoavailablefor
mosttitles().Formoreinformation,
contactourcorporate/institutionalsalesdepartment:(800)
998-9938or
NutshellHandbook,theNutshellHandbooklogo,andthe
O'ReillylogoareregisteredtrademarksofO'ReillyMedia,Inc.
XMLPublishingwithAxKit,theimageoftarpans,andrelated
tradedressaretrademarksofO'ReillyMedia,Inc.
Manyofthedesignationsusedbymanufacturersandsellersto
distinguishtheirproductsareclaimedastrademarks.Where
thosedesignationsappearinthisbook,andO'ReillyMedia,Inc.
wasawareofatrademarkclaim,thedesignationshavebeen
printedincapsorinitialcaps.
Manyofthedesignationsusedbymanufacturersandsellersto
distinguishtheirproductsareclaimedastrademarks.Where
thosedesignationsappearinthisbook,andO'ReillyMedia,Inc.
wasawareofatrademarkclaim,thedesignationshavebeen
printedincapsorinitialcaps.
Whileeveryprecautionhasbeentakeninthepreparationofthis
book,thepublisherandauthorsassumenoresponsibilityfor
errorsoromissions,orfordamagesresultingfromtheuseof
theinformationcontainedherein.
Preface
ThisbookintroducesApacheAxKit,amod_perl-basedextension
totheApachewebserverthatturnsApacheintoanXML
publishingandapplicationenvironment.
WhoShouldReadThisBook
Thisbookisintendedtobeusefultoanyweb
developer/designerinterestedinlearningaboutXMLpublishing,
ingeneral,andthepracticalaspectsofXMLpublishing,
specificallywiththeApacheAxKitXMLapplicationand
publishingserver.WhileAxKitanditstechniquesarethe
obviousfocus,manyideaspresentedcanbereusedinother
XML-basedpublishingenvironments.IfyoudonotknowXML
anddreadthethoughtofconsumingapileofesoteric
specificationstounderstandwhatisbeingpresented,don't
worrythisbooktakesafiercelypragmaticapproachthatwill
teachyouonlywhatyouneedtoknowtobeproductivewith
AxKit.AquickscanofXML'sbasicsyntaxisprobablyalltheXML
knowledgeyouneedtogetstarted.
AlthoughAxKitiswritteninPerl,itsusersneednotknowPerlat
alltouseittoitsfulleffect.However,developerswhodoknow
PerlwillfindthatAxKit'smodulardesignallowsthemtoeasily
writecustomextensionstomeetspecializedrequirements.
Similarly,AxKitusersarenotexpectedtobeApacheHTTP
servergurus,butthosewhodoknowevenabitabouthow
Apacheworkswillfindthemselveswithavaluableheadstart:
WebdeveloperswilllearnXMLpublishingtechniques
throughavarietyofpractical,testedexamples.
PerlprogrammerswillseehowtheycanuseXMLtobuildon
theirexistingskills.
MarkupprofessionalswilldiscoverhowAxKitcombines
standardXMLprocessingtoolswiththoseuniquetothePerl
programminglanguagetocreateaflexible,easy-to-use
environmentthatdeliversonXML'spromiseasapublishing
technology.
What'sInside
Thisbookisorganizedintoninechaptersandoneappendix.
Chapter1,XMLasaPublishingTEchnology,putsXMLinto
perspectiveasamarkuplanguage,presentssomeofthetopics
commonlyassociatedwithXMLpublishing,andintroducesAxKit
asanXMLapplicationandpublishingenvironment.
Chapter2,InstallingAxKit,guidesyouthroughtheprocessof
installingAxKit,includingitsdependenciesandoptional
modules.Thischapteralsocoversplatform-specificinstallation
tips,howtonavigateAxKit'sinstalleddocumentation,and
wheretogoforadditionalhelp.
Chapter3,YourFirstXMLWebSite,guidesyouthroughthe
processofcreatingandpublishingasimpleXML-basedwebsite
usingAxKit.Specialattentionispaidtothebasicprinciplesand
techniquescommontomostprojects.
Chapter4,PointsofStyle,detailsAxKit'sstyleprocessing
directives.Itgivesspecialattentiontohowtocombinevarious
directivestocreatebothsimpleandcomplexprocessingchains,
andhowtoconditionallyapplyalternatetransformationsusing
AxKit'sStyleChooserandMediaChooserplug-ins.
Chapter5,TransformingXMLContentwithXSLT,offersa
"quickstart"introductiontoXSLT1.0andhowtouseit
effectivelywithinAxKit.ACookbook-stylesectionoffers
solutionstocommondevelopmenttasks.
Chapter6,TransformingXMLContentwithXPathScript,
introducesAxKit'smorePerl-centricalternativetoXSLT,
XPathScript.ThefocusisonXPathScript'sbasicsyntaxand
templateoptionsforgeneratingandtransformingXMLcontent.
ThechapteralsocontainsaCookbook-stylesection.
Chapter7,ServingDynamicXMLContentwithXPathScript,
presentsanumberoftoolsandtechniquesthatcanbeusedto
generatedynamicXMLcontentfromwithinAxKit.Thefocusis
onAxKit'simplementationofeXtensibleServerPages(XSP)and
onhowtocreatereusableXSPtaglibrariesthatmapXML
elementstofunctionalcode,aswellasonhowtousePerl's
SAWAweb-applicationframeworktoprovidedynamiccontentto
AxKit.
Chapter8,ExtendingAxKit,introducesAxKit'sunderlying
architectureandoffersadetailedviewofeachofitsmodular
components.Thechapterpaysspecialattentiontohowandwhy
developersmaydevelopcustomcomponentsforAxKitand
providesadetailedAPIreferenceforeachcomponentclass.
Chapter9,IntegratingAxKitwithOtherTools,showshowto
useAxKitinconjunctionwithotherpopularweb-development
technologies,fromplainCGItoMasonandtheTemplateToolkit.
AppendixA,TheAxKitConfigurationDirectiveReference,
providesacompletelistofconfigurationblocksanddirectives.
ConventionsUsedinThisBook
Thefollowingtypographicalconventionsareusedinthisbook:
Italic
Indicatesnewterms,URLs,emailaddresses,filenames,file
extensions,pathnames,directories,andUnixutilities.
Constantwidth
Indicatescommands,options,switches,variables,
attributes,keys,functions,types,classes,namespaces,
methods,modules,properties,parameters,values,objects,
events,eventhandlers,XMLtags,HTMLtags,macros,the
contentsoffiles,ortheoutputfromcommands.
Constantwidthitalic
Showstextthatshouldbereplacedwithuser-supplied
values.
Constantwidthbold
Showscommandsorothertextthattheusershouldtype
literally.
Thisiconsignifiesatip,suggestion,orgeneralnote.
Thisiconindicatesawarningorcaution.
UsingCodeExamples
Thisbookisheretohelpyougetyourjobdone.Ingeneral,you
mayusethecodeinthisbookinyourprogramsand
documentation.Youdonotneedtocontactusforpermission
unlessyou'rereproducingasignificantportionofthecode.For
example,writingaprogramthatusesseveralchunksofcode
fromthisbookdoesnotrequirepermission.Sellingor
distributingaCD-ROMofexamplesfromO'Reillybooksdoes
requirepermission.Answeringaquestionbycitingthisbook
andbyquotingexamplecodedoesnotrequirepermission.
Incorporatingasignificantamountofexamplecodefromthis
bookintoyourproduct'sdocumentationdoesrequire
permission.
Weappreciate,butdonotrequire,attribution.Anattribution
usuallyincludesthetitle,author,publisher,andISBN.For
example:"XMLPublishingwithAxKit,byKipHampton.
Copyright2004O'ReillyMedia,Inc.,0-596-00216-5."
Ifyoufeelyouruseofcodeexamplesfallsoutsidefairuseor
thepermissiongivenabove,feelfreetocontactusat
HowtoContactUs
WeatO'Reillyhavetestedandverifiedtheinformationinthis
booktothebestofourability,butyoumayfindthatfeatures
havechanged(oreventhatwehavemademistakes!).Please
letusknowaboutanyerrorsyoufind,aswellasyour
suggestionsforfutureeditions,bywritingto:
O'ReillyMedia,Inc.
1005GravensteinHighwayNorth
Sebastopol,CA95472
(800)998-9938(intheUnitedStatesorCanada)
(707)829-0515(internationalorlocal)
(707)829-0104(fax)
Wehaveawebpageforthisbook,wherewelisterrata,
examples,oranyadditionalinformation.Youcanaccessthis
pageat:
/>Tocommentorasktechnicalquestionsaboutthisbook,send
emailto:
Youcansignupforoneormoreofourmailinglistsat:
Formoreinformationaboutourbooks,conferences,software,
ResourceCenters,andtheO'ReillyNetwork,seeourwebsite
at:
Youmayalsowritedirectlytotheauthorat
Acknowledgments
Iwouldliketothankmyeditor,SimonSt.Laurent,forhis
wisdomandfeedback,andthegoodfolksatO'Reillyfor
standingbehindthisbookandseeingitthroughtocompletion.
ThankstoMattSergeantforcodingAxKitinthefirstplaceand
toMatt,BarrieSlaymaker,KenMacLeod,MichaelRodriguez,
GrantMcLean,andthemanyothermembersofthePerl/XML
communityfortheirtirelesseffortsandgeneralmarkup
processingwizardry.Thanks,andaheartyandheartfelt
"DAHUT!"toRobinBerjon,JörgWalter,MichaelKröll,Steve
Willer,MikeNachbaur,ChrisPrather,andtheothercryptid
denizensoftheAxKitcabal.Finally,specialthanksgoouttomy
family,especiallytomybrother,Jason,whosepatience,
support,andencouragementtrulymadethisbookpossible.
Chapter1.XMLasaPublishing
Technology
IntheearlydaysofthecommercialWeb,otherwisereasonable
andintelligentpeopleboughtintothenotionthatsimplyhaving
apubliclyavailablewebsitewasenough.Enoughtogettheir
companynoticed.Enoughtobecomeamajorplayerinthe
globalmarket.Enoughtocapturethatmagicalandvaguely
definedcommoditycalledmarketshare.Somehowthatwould
beenoughtoensurethatconsumersandinvestorswouldpour
outbagsofmoneyonthestepsofcompanyheadquarters.In
thoseheadydays,budgetsforweb-relatedtechnologies
appearedlimitless,andthedevelopmentpracticesofthetime
reflectedthatitseemedperfectlyreasonabletofollowthe
celebrationofasite'srolloutwithinitialdiscussionsaboutwhat
thenextversionofthatsitewouldlooklikeanddo.
(Sometimes,thenextredesignwasalreadyintheworksbefore
thecurrentredesignwasevenlaunched.)Itdidnotmatter,
technically,thatasitewaslargelyhardcodedandinflexible,or
thatthescriptsthatimplementedthedynamicapplications
weremessyandimpossibletomaintainovertime.What
matteredwasthattheprojectwasdonequickly.Ifafewbad
choicesweremadealongtheway,itwasthought,theycould
alwaysbeaddressedduringtheinevitableredesign.
Thosedaysaregone.
Thegoldrushmentalityhasrecededandcompaniesandother
organizationsarelookingformorefromtheirinvestmentinthe
Web.Simplyhavingasiteoutthereisnotenough(andtruly,it
neverwas).Thesitemustdosomethingthatmeasurablyadds
valuetotheorganizationandthatvaluemustexceedthecost
ofdevelopingthesiteinthefirstplace.Inotherwords,theNew
Economyhadaratherabruptintroductiontotherulesof
BusinessAsUsual.Thisindustry-widebelt-tighteningmeans
thatwebdevelopersmustadjusttheirapproachtoproduction.
Companiescannolongeraffordtowriteoffthetimeandenergy
investedindevelopingawebsitesimplytoreplaceitwith
somethinglargelysimilar.Developersareexpectedtoprovide
dynamic,malleablesolutionsthatcanevolveovertimeto
includenewcontent,dynamicfeatures,andsupportfornew
typesofclientsoftware.Inshort,today'sdevelopersarebeing
askedtodomorewithless.Theyneedtoolsthatcancopewith
majorchangestoasiteoranapplicationwithoutalteringthe
foundationthatisalreadythere.
Farfrombeingastoryofgloomanddoom,theslimmingofweb
budgetshasledtoanaturalandpositivereevaluationofthe
toolsandtechniquesthatgointodevelopingandmaintaining
onlinemediaandapplications.Theneedtoprovidemore
optionswithfewerresourcesisdrivingthecreative
developmentofhigher-levelapplicationandpublishing
frameworksthatarebetterabletomeetchangingrequirements
overtimewithaminimumofduplicatedeffort.Ironically,in
manyways,the"dotbomb"wasthebestthingthatcouldhave
happenedtowebsoftware.
Onekeyconceptbehindtoday'smoreadaptivewebsolutions
liesinmakingsurethatthecontentofthesiteisreusable.By
reusablecontentImeanthattheessentialinformationis
captured(oravailable)inawaythatlendsitselftodifferent
usesorviewsofthatdatabasedonthecontextinwhichitis
beingrequested.Consider,forexample,thetaskofpublishing
aninformalessayaboutthelifeofJazzgreatLouisArmstrong.
Presumingyouwillonlybepublishingthisdocumentviathe
Web,youstillhaveavarietyofchoicesabouttheforminwhich
thedocumentwillbeavailable.YoucouldpublishitinHTMLfor
fasterdownloadingorPDFforfinercontroloverthevisual
layout.IfyoulimitthechoicetoHTML,youstillhavemany
choicestomakewhatlinks,adbanners,andothersupporting
contentwillyouinclude?Doesthedataincludeageneric
boilerplatethatisthesameforeverypageonthesite,orwill
youattempttoprovideamoreintimatesenseofcontextby
providinglinkstootherrelatedtopics?Ifyouwanttooffera
senseofcontext,howdoyoudecidewhatisrelated?Doyou
frametheessayinthecontextofinfluentialJazzmusicians,
prominentAfricanAmericans,orfamousnativesofNew
Orleans?Giventhateachofthesecontextsisarguablyvalid,
whatifyouwanttopresentallthreeandlettheuserdecide
whichnavigationalpathsuitsherinterestsbest?Youcouldalso
saythattheessay'smetadata(itstitle,author'sname,abstract
summary,etc.)isreallyjustanotherwayoflookingatthesame
document,albeitahighlyselectiveandfilteredone.Eachof
thesechoicesrepresentsnothingmorethananalternative
contextualviewofthesamecontent(theArmstrongessay).All
thatreallychangesisthewayinwhichthatcontentis
presented.
Figure1-1showsasimplerepresentationofyouressayand
someofitspossiblealternateviews.Howcouldyouhitallof
thesetargets?Obviously,youcouldhand-authorthedocument
ineachofthevariousformatsandcontexts,butthatwouldbe
time-consumingandunrealisticforallbutthetiniestofsites.
Ideally,whatyouwantisasystemthat:
Storesthedatainarichandmeaningfulwaysouserscan
accessiteasilyatvariouslevelsofdetail
Providesaneasywaytoaddalternate(expandedor
filtered)viewsofthatdatawithoutrequiringchangestothe
sourcedocument(or,inthecaseofdynamiccontent,the
codethatgeneratesit)
Figure1-1.Multipleviewsofasingledocument
Althoughmanyweb-developmentframeworksoffertheability
tocreatesitesinamodularfashionthroughreusable
components,mostfocuslargelyonautomatingredundancy
throughtheinclusionofcommoncontentblocksanduseof
codemacros.Thesesystemsrecognizethevalueofseparating
contentfromlogic,buttheyaretypicallydesignedtoconstruct
documentsinonlyonetargetformat.Thatis,thetemplates,
widgets,andcontent(orcontent-generatingcode)areall
focusedonconstructingasinglekindofdocument(usually
HTML).Renderingthesamecontentinmultipleformatsis
cumbersomeandoftenrequiressomuchduplicationatthe
componentlevelthatmodularitybecomesmoreburdenthan
blessing.Onetechnology,however,isfirmlyrootedintheideas
ofgeneratingcontext-specificrepresentationsofrichcontent
sourcesthroughbothmodularconstructionanddata
transformationthattechnologyisXML.
Thisiswherethesubjectofthisbook,AxKit,comesin.Asan
XMLpublishingandapplicationserver,AxKitbeginswithXML's
high-levelnotionofreusablecontentandseekstosimplifythe
tasksassociatedwithcreatingdynamic,context-sensitive
representationsfromrichXMLsources.Thatis,thefactthat
youneedtodeliverthesamecontentinavarietyofwaysisa
given,andpartofwhatAxKitdoesistoprovideaframeworkto
ensurethatthecorecontentistransformedcorrectlyforthe
givensituation.
1.1ExplodingaFewMythsAboutXML
Publishing
XMLanditsassociatedtechnologieshavegeneratedenormous
interest.XMLpunditsdescribeinfloridtermshowmovingto
XMListhefirststeptowardaUtopiannewWeb,whilewellfundedmarketingdepartmentschurnoutpageafterpageof
ambiguousdoublespeakabouthowusingXMListhecurefor
everythingfromlowvisitortraffictomale-patternbaldness.
Whileyoumayadmirevisionaryzealontheonehandand
understandthesimpledesiretogeneratenewbusinessonthe
other,theunfortunateresultisthatmanywebdevelopersare
confusedaboutwhatXMLisandwhatitisgoodfor.Here,I
clearupafewofthemorecommonfallaciesaboutXMLandits
useasaweb-publishingtechnology.
UsingXMLmeanshavingtomemorizeapileofcomplex
specifications.
Thereiscertainlynoshortageofspecifications,
recommendations,orwhitepapersthatdescribeorrelateto
XMLtechnologies.Developingevenacursoryfamiliarity
withthemallwouldbeafull-timejob.Thefactis,though,
thatmanyofthesespecificationsonlydescribeasingle
applicationofXML.Unlessthattoolsolvesaspecificexisting
need,there'snoreasonforadevelopertotrytouseit,
especiallyifyoucometoXMLfromanHTMLbackground.A
generalintroductiontoXML'sbasicrules,andperhapsa
quicktutorialortwothatcoversXSLToranother
transformativetool,areallyouneedtobeproductivewith
XMLandatoolsuchasAxKit.Besane.Takeapragmatic
approach:learnonlywhatyouneedtodeliveronthe
requirementsathand.
MovingtoXMLmeansthrowingawayallthetoolsand
techniquesthatIhavelearnedthusfar.
XMLissimplyawaytocapturedata,nothingmore.Notool
isappropriateforallcases,andknowinghowtouseXML
effectivelysimplyaddsanothertooltoyourbagoftricks.
Additionally(asyouwillseeinChapter9),manytoolsyou
maybeusingtodaycanbeintegratedseamlesslyinto
AxKit'sframework.Youcankeepdoingwhatworkedwellin
thepastwhiletakingadvantageofwhatAxKitmayofferin
thewayofadditionalfeatures.
XMListotallyrevolutionaryandwillsolveallofmypublishing
problems.
Thisistheoppositeofthepreviousmythbutjustas
common.Despiteconsiderablepropagandatothecontrary,
XMLoffersnothingmorethanawaytorepresent
information.Initself,XMLdoesnotaddresstheissuesof
archiving,informationretrieval,indexing,administration,or
anyothertasksassociatedwithpublishingdocuments.It
maymakefindingorbuildingtoolstoperformthesetasks
simpler,faster,morestraightforward,orlessadhoc,butno
magicisinvolved.
XMLisusefulonlyfortransferringdatastructuresamongweb
services.
Twopopularexchangeprotocols,SOAPandXML-RPC,use
XMLtocapturedata,butsuggestingthatthisistheonly
legitimateuseforXMLissimplywrong.Infact,XMLwas
originallyintendedprimarilyasapublishingtechnology.
ToolssuchasSOAPonlyemergedlaterwhenitwas
discoveredthatXMLwasquitehandyforcapturingcomplex
datainawaythatcommonprogramminglanguagescould
share.TosaythatXMLisonlyusefulfortransferringdata
betweenapplicationsisabitlikesayingthattheASCIItext
formatisonlyusefulforcomposingemailmessagespopular,
yes;exclusive,no.
Myprojectonlyrequiresdocumentstobeavailabletoweb
browsersasHTML;usingXMLwouldaddcomplexityand
overheadwithoutaddingvalue.
Itistrueneedingtodeliverthesamecontenttodifferent
targetclientsisacompellingreasontoconsiderXML
publishing,butitiscertainlynottheonlyone.Separating
thecontentfromitspresentationalsoprovidestheabilityto
fundamentallyalterthelookandfeelofanentiresite
withoutworryingabouttheinformationbeing
communicatedgettingclobberedinthebargain.Similarly,
newsitedesignprototypescanbecreatedusingtheactual
contentthatwillbedeliveredinproductionratherthanthe
boilerplatefillerthatsooftenonlyfavorsthedesigners'
senseofaesthetics.
Asforperformance,trueXMLpublishingframeworkssuchas
AxKitoffertheabilitytocachetransformedcontentevenseveral
viewsofthesamedocumentandwillonlyreprocesswheneither
thesourceXMLorthestylesheetsbeingappliedaremodified
(orwhenexplicitlyconfigured,reprocessforeachrequest).The
latestdataavailableshowsthatAxKitcandelivercached,
transformedcontentatroughly90%ofthespeed(requestsper
second)offeredbyservingthesamecontentasstaticHTML.