260 likes | 464 Views
XML in Multi-channel Publishing. Usage of XML. Workflow. <?xml version="1.0" encoding="utf-8" standalone="no"?> <P2Main xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ClipContent> <ClipName>0001V1</ClipName>
E N D
XML in Multi-channel Publishing Defining
Usage of XML Workflow <?xml version="1.0" encoding="utf-8" standalone="no"?> <P2Main xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ClipContent> <ClipName>0001V1</ClipName> <GlobalClipID>060A2B340101010501010D43130000006DE8A27B794905D1008045822CE2045F</GlobalClipID> <Duration>230</Duration> <EditUnit>1/25</EditUnit> <EssenceList> <Video ValidAudioFlag="false"> <VideoFormat>MXF</VideoFormat> <Codec>DV25_420</Codec> <FrameRate>50i</FrameRate> <StartTimecode>09:10:28:22</StartTimecode> <StartBinaryGroup>DB0F502F</StartBinaryGroup> <AspectRatio>16:9</AspectRatio> Configuration <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>HelTechXML</name> <comment></comment> <projects> </projects> <buildSpec> </buildSpec> <natures> </natures> </projectDescription> Metadata Etc… • <RmtInf> • <Strd> • <CdtrRefInf> • <CdtrRefTp> • <Cd>SCOR</Cd> • </CdtrRefTp> • <CdtrRef>1245</CdtrRef> • </CdtrRefInf> • </Strd> • </RmtInf> Publishing and content management eCommerce Defining
How Do I Recognize XML File starts with XML declaration <?xml version="1.0"?> (XML) 1.0 (Fifth Edition) W3C Recommendation 26 November 2008 <?xml version="1.1"?> (XML) 1.1 (Second Edition) 2006-08-16 Extensible Markup Language Defining
Four Main Areas 1. Data exchange between organization ”e-commerce” • SOAP and Web Services (RosettaNet ...) • XML + SCHEMA (+ XSL) 2. Open and self describing file format interface ”knowledge management” • Parsing (Flash, PHP, Java programming, JDF …) • XML and DOM 3. Multi-channel Publishing ”e-publishing” • XML + XSL + SCHEMA 4. Metadata - XML Defining
Impact of XML Impact of XML in three areas: e-commerce, e-publishingand knowledge management for conducting business on the Web. Ability of XML to separate presentation from content is just what is needed, because the content changes more rapidly than the layout. Defining
Cross-media Publishing • Cross-media publishing tools With no simple all-in-one solution for cross-media workflows. • Cross media publishing is a fact of life for graphic arts professionals these days as more and more content is turning up on the Web and on electronic media. Defining
Key benefits of XML One of the key benefits of XML is that it enables content updates, which otherwise would have to be done manually, to be automated. Regardless of whether you are talking about updating a Web site or a product catalog, the requirements are similar: rapid updates accuracy scalability Because XML provides a consistent, expressive, and standard format, it enables the automated processing, delivery and updating of information. Defining
XML in Publishing Different Content and Presentation XSL Presentation XML Content Different Content XSD Sructure Different Presentation Defining
XML and Publishing Media Publish to Web via HTML+CSS Publish to Print Media via XSL-FO and PDF Publish to various applications e.g. Excel Publish to EDI for Partners XSL Transformation is transforming XML documents into other XML documents Defining
XML in Multi-channel Publishing Media publishing Channels carried by different Devices presented by different Users used by different Person tailored for Defining
WWW Multimedia content Demands of XML in Multi-channel Publishing Mobile Amount of information Print Media Connection type eMail DigiTV Price Speed XSL Presentation Media Interactive content Browsers PC-PDA-Mob Different versions Print mach. Device limitations Channel Audio Presentation capabilities XML Content SuperText Device Individuals Legality User groups Non disclosive Users Community Confidence XSD Sructure User location Interest Id Service Person Context On/off demand History Neighbours On/offline Defining
XML Publishing in Practice: Varying Contents and Presentations content A program.xml Stylesheet program.xsl content B program.xml content C program.xml Stylesheet B program.xsl content A program.xml Stylesheet A program.xsl Defining
XML Publishing in Practice: Different Output Formats content metropolia.xml format pdf toPDF.xsl format xhtml toPDF.xsl Defining
XML Publishing in Practice: Different Users Stylesheet A phoneEveryone.xsl Content: phonebook.xml Stylesheet B phoneConfidential.xsl Defining
XML Publishing in Practice: Personalizing content cd.xml stylesheet cd.xsl Defining
W3C World Wide Web Consortium http://www.w3.org/ • “W3C:n jäsenet kehittävät yhdessä universaaleja Web-teknologioita, mahdollistaen maailmanlaajuisen viestinnän ja liiketoiminnan kenelle tahansa, missä tahansa, milloin tahansa ja millä laitteella tahansa. “ • We ensure that that both technological protocols and social conventions respect basic values. That Web remains a universal platform: independent of any specific hardware device, software platform, language, culture, or disability. Tim Berners-Lee, W3C Director and inventor of the World Wide Web • http://www.w3c.tut.fi/index.html • W3c Suomen toimisto Defining
XML in Publishing Process Parser Transformer 3. Publish Presentation .xsl Testing of ”Well Formed” Parser Validation is needed only when the xml –file is created 2. Create Document .xml Data-centric output e.g. registry Validation with dtd / xsd Parser Document-centric Output e.g. Finnish Law Book 1. Define Sructure .dtd or .xsd 0. Structure Diagram Defining
Step 0: Structure analyzes document greeting #PCDATA language #PCDATA Defining
Step 1: Document Type Definition • HelloWorld.dtd <!ELEMENT document (greeting, language)> <!ELEMENT greeting (#PCDATA)> <!ELEMENT language (#PCDATA)> Defining
Step 2: Content with XML • HelloWorld.xml <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE document SYSTEM "HelloWorld.dtd"> <document> <greeting>Hello World</greeting> <language>English</language> </document> Defining
Step 3: Markup with XSL stylesheet <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="DTD/xhtml1-strict.dtd" cdata-section-elements="script style" indent="yes“ encoding="ISO-8859-1"/> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > <head> <title> Hello World</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <h1> <xsl:value-of select="document/greeting" /> </h1> <h2> <xsl:value-of select="document/language" /> </h2> </body> </html> </xsl:template> </xsl:stylesheet> • HelloWorld.xsl Defining
Step 4: Publishing • HelloWorld.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8“ /> <title> Hello World</title></head> <body><h1>Hello World</h1> <h2>English</h2> <p><a href="http://validator.w3.org/"> <img src="http://validator.w3.org/images/vxhtml10" alt="Valid XHTML 1.0!" height="31" width="88"></img></a> </p></body></html> PHP transformer leaves meta tag unclosed Defining
XHTML supports three DOCTYPEs <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <xsl:output method="xml" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" cdata-section-elements="script style" indent="yes" encoding="ISO-8859-1"/> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <xsl:output method="xml" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" cdata-section-elements="script style" indent="yes" encoding="ISO-8859-1"/> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> in xsl in xsl Defining
Xhtml is xml Version of html 4.1 <xsl:output method="xml"== default, method =“html” version =“ 4.0”, .. text,name Optional - defines the outputformat. media-type="text/html“ MIME type of the output (here html page) doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" Value of the PUBLIC attribute doctype-system=http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd Value of the SYSTEM attribute cdata-section-elements="script style"<xsl:text> // <![CDATA[ for (var i = 0; i < 10; i++) alert(i); // ]]> otherwice < <xsl:text> indent="yes"“no” = extra lines/whitespace encoding="ISO-8859-1"/> Value of the encoding attribute in the output Defining
Main XML Components Presentation program.xsl extensible Style sheet language Content program.xml eXtensible Markup Language jäsennin Parser XSL muunnos XSL Transformation XSL-FO formating Defining the structure origram.dtd (or .xsd) Document Type Definition (or XML Schema) program.pdf .. program.html ohjelma.xml Defining