Logo/

XML Publishing and Transformation

Log in

Made with ScholarlyMake flashcards like these from your own notes

XML Publishing and Transformation

Questions and answers

27 cards
  1. Question:What is the main purpose of the XML format in data handling?

    Answer:The XML format is designed to aggregate data, which facilitates their storage and circulation.

  2. Question:Why should XML data be published and made visible to users?

    Answer:XML data should be published for purposes such as control, for company personnel, or for clients to view at a given time.

  3. Question:In what forms can the publishing of text data appear?

    Answer:Text data publishing can appear as web pages, PDF documents, RTF files, and other formats associated with a graphic charter including colors, fonts, tables, and images.

  4. Question:What types of graphics can be published using XML, and which format is mentioned for images?

    Answer:Graphical publications using XML include histograms and pie charts, with images often in the SVG format.

  5. Question:Why are CSS and XSL important in the formatting of XML documents?

    Answer:CSS and XSL are important because XML is a data description format rather than a presentation format, so styling and layout are applied through external languages like CSS and XSL.

  6. Question:What does CSS stand for and what is its role with XML?

    Answer:CSS stands for Cascading StyleSheet; it is widely used to visually style XML documents by specifying how elements should be displayed based on tag names, classes, IDs, or attributes.

  7. Question:Why can't XML documents be displayed directly in web browsers without CSS or XSL?

    Answer:Because XML is not HTML, browsers cannot display XML documents directly without an associated stylesheet like CSS to specify how to present the elements.

  8. Question:What is the principle behind CSS's 'cascading' effect?

    Answer:The cascading principle means that all descendant elements inherit the style properties of their parent elements unless otherwise specified.

  9. Question:How is a CSS stylesheet typically linked to an XML document?

    Answer:A CSS stylesheet is inserted or linked within the XML document so that the browser knows how to apply styles when rendering the XML content.

  10. Question:What limitation of CSS makes XSL necessary for XML documents?

    Answer:CSS does not allow manipulation or transformation of XML elements; it only defines presentation styles. Therefore, XSL is needed to transform XML documents structurally.

  11. Question:What is XSLT and what recommendation did W3C make about it?

    Answer:XSLT (eXtensible Stylesheet Language Transformation) is a W3C recommendation (from November 1999) that transforms an XML document using XML-based style sheets and XPath expressions to navigate and manipulate XML content.

  12. Question:Why is XSLT indispensable when the XML document's structure differs from HTML?

    Answer:Because XSLT can transform the structure of an XML document into HTML or other formats, it is essential when the XML doesn't match the structure required for HTML display.

  13. Question:List some transformation capabilities provided by XSLT.

    Answer:XSLT can add text content, delete, create, reorder, and sort elements, reuse elements elsewhere in the document, transform data between different XML formats, and use recursion to explore documents.

  14. Question:Explain the general principle of how XSLT applies transformations to an XML document.

    Answer:XSLT uses templates, each consisting of an expression and content. It applies transformation rules matching parts of the XML document and replaces matched elements with the specified content in the output document, which can be XML, HTML, or text.

  15. Question:What is the nature of an XSL file in the context of XML transformations?

    Answer:An XSL file is itself an XML file that must respect the syntax norms of XML and contains specific instructions intended for the XSLT processor.

  16. Question:What namespace prefix is used to identify XSLT instructions within an XSL file?

    Answer:The namespace prefix is xmlns:xsl="http://www.w3.org/1999/XSL/Transform".

  17. Question:What is the concept of a 'Template' in XSLT transformation?

    Answer:A 'Template' in XSLT is a pair consisting of an expression written in XPath and some content; the XPath expression selects nodes in the input XML tree to be replaced by the template content.

  18. Question:How does XPath relate to XSLT templates?

    Answer:XPath expressions in templates identify which XML nodes in the input document are selected to be replaced by the content of the template.

  19. Question:What happens to XML nodes that are not selected by any XPath expression during an XSLT transformation?

    Answer:They are not replaced and remain unchanged in the output document.

  20. Question:In XSLT, what comprises the content of a template?

    Answer:The content includes elements and texts that will replace the selected nodes in the input XML.

  21. Question:What is the general principle of XSLT transformation regarding how to describe the output?

    Answer:In XSLT, you describe what you want to get (the desired output) rather than how to get it, meaning the language is declarative, not procedural.

  22. Question:How is an external XSLT file referenced in an XML document?

    Answer:By including a syntax in the XML document that points to the external stylesheet, typically using an <?xml-stylesheet?> processing instruction (not fully detailed in the provided text).

  23. Question:What is the root element of an XSLT stylesheet?

    Answer:The root element of an XSLT stylesheet is .

  24. Question:How is an XSLT stylesheet organized?

    Answer:It is organized as a set of transformation rules, called templates, each defining how certain XML nodes are processed or transformed.

  25. Question:What is the general form of an XSLT template?

    Answer:It consists of an XPath path (e.g., / for the whole document) and content made up of XSL elements mixed with other XML elements and text that follow XML syntax rules.

  26. Question:What namespace must the first-level elements of an XSLT stylesheet use?

    Answer:They must use the namespace xmlns:xsl="http://www.w3.org/1999/XSL/Transform".

  27. Question:What is the function of XPath within XSLT processing?

    Answer:XPath is the language used to navigate and select nodes within an XML document to identify which nodes should be transformed.