SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
XML Transcoding
XML transcoding is the term used to describe the process of parsing and extracting XML data. The
XML transcoding technology is accessible through the DOM Browser which provides the developer
with superior source and target document visualization ensuring correct selection of the source node
(s) and placement into the target node—all through a point and click user interface. StableDOM—for
HTML transcoding—along with the XML and SQL data transcoding technologies may used together to
create an enterprise Mashup site. All of which are accessible through a point-and-click extraction
capability.




XML Transcoding Features

The XML transcoding technology provides the following major capabilities:

    1. Parses XML content and provides a W3C XML DOM.
    2. Enables XPath, XSLT, or XQuery access to the W3C XML DOM view.
    3. Provides a high-level XML Transcoding Java API to access nodes based on an XPath query.
    4. Provides a DOM Browser user interface enabling point-and-click extraction of XML element,
       attribute, and text nodes.
    5. Integrated with the XSLT/XQuery code generation component for transcoding from XML to
       XHTML, WML, and other XML document types such as RSS.
    6. Integrated with the portal code generation component for transcoding from multiple HTML
       pages to XHTML and WML portlets based on the JSR 168 Portlet API (WSRP).
    7. Supports URL and DOM caching for application specific cache management.



Standard XML Parsing Pipeline

The XML transcoding technology first parses the XML document and then a W3C DOM is made
available. The Xerces parser is the default XML parser.

This diagram presents a high-level view of the parsing pipeline:




Alternate XML Parsing Pipeline

In those cases where the source XML document is very large, the developer has the option to either
use our high performance Regex Element Finder or Pull Parser Component. Both of these
technologies are better suited to the memory demands and speed requirements needed to process

© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                                   1
large XML documents. Both provide better loading/searching/filtering APIs than the classic SAX or
DOM parsers and APIs. Nonetheless, these APIs can return DOM nodes and are therefore fully
interoperable with downstream technologies such as XSLT.




       For more information about the <alt> Pull Parse technology and some of its capabilities, please review
the product documentation for the Pull Parse Tool which leverages the underlying Pull Parse technology:
http://altmobile.com/pdf/Pull%20Parse%20Tool.pdf.



Accessing the W3C DOM

After completing the parsing and a W3C XML DOM is made available, you can access this DOM with 5
different technologies depending on your needs:

    1.   W3C XML DOM API.
    2.   XPath access through Jaxen.
    3.   XSLT access through Xalan.
    4.   XQuery access through Saxon.
    5.   XML Transcoding Java API which is based on common access patterns.

This diagram depicts the XML parsing pipeline and application access technologies:




Accessing the DOM with the XML Transcoding Java API

The XML Transcoding access API is implemented by the DOMUtil class in the package
com.altmobile.platform.util.xml.dom and provides the following method signature list:

    1.       static public String getContent (String urlString, String xpathString)
    2.       static public Node getNode (String urlString, String xpathString)



Accessing the DOM with the Transcoding XSL-Over-Java API

The XML Transcoding Java API may also be accessed from the user defined function mechanism
provide by the Xalan XSLT engine. There are two functions to extract XML content using XSLT. These
two functions were designed to mimic the XSLT “copy” pattern:
    1. public static String getContent(String urlString, String xpathString)
    2. public static Node getNode(String urlString, String xpathString)

The function getContent() will copy the text content of a node and getNode() will perform a
deep copy of the node.

© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                                            2
The following screen shots highlight the user function declaration:




The function getContent() should be used with the <xslt:value-of> element and the
function getNode() should be used with the <xslt:copy-of> element.




© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                3
Point-and-Click Extraction

Though the developer can manually type the code to perform the XML parsing and extraction using
languages such as XSLT or XQuery, the DOM Browser can automate this process with point-and-click
extraction and code generation.

As seen in this screen shot, the DOM Browser allows visual extraction:




The Transcoding Development Process

To transcode your XML into RSS, XHTML or WML, you should follow these steps:
    1. Construct your target document in the DOM Browser, or load a valid XML document into the
        DOM Browser. For example, using an RSS sample document as seen here:




© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                               4
We want to dynamically access a remote XML document and extract content and place it as the
   child of the link element.

   2. Decide which elements and text content should be extracted from the external XML
      document.
   3. Select the “Import Last Child from XML Source” menu item from the parent element of the
      to-be-imported node as seen here:




© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                             5
4. This will launch a new empty DOM Browser, allowing you to type the URL of the remote
      document in the URL address field and extract a DOM element, an element’s text content, or
      an attribute’s content as needed.




© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                               6
In the below screen capture, we want to extract the document_url element content:




To save space for this screen shot, we are abbreviating the text node content.

© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                        7
To learn more about the space-saving technologies of the DOM Browser, view its documentation at http://
altmobile.com/pdf/DOM%20Browser.pdf



After selecting the “Extract Node Value” menu item from the popup:




our target document will look like this:




© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                                            8
To save space for this screen shot, we are abbreviating the text node content.



      To learn more about the space-saving technologies of the DOM Browser, view its documentation at http://
altmobile.com/pdf/DOM%20Browser.pdf



    5. Select the “Transform to Dynamic XSLT Source” menu item which cascades off the “XSLT”
       menu item which is found in the document node popup menu as seen here:




This displays the Dynamic XSLT source code which contains instructions to create both the static RSS
and dynamic RSS using the special transcoding function getContent(url, xpath) as seen here:




© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                                            9
Creating a Mashup or Web Portal through XML Transcoding

As mentioned before, the XML transcoding technology supports transcoding any element, attribute or
text value. As seen in the diagram below, you can transcode XML content from multiple documents:




In fact, you use the same development process to selectively transcode content from different
documents, HTML sites, and SQL databases. The only real-world limitation is the time it takes to
access the remote documents and the processing time needed in the parsing pipeline. URL and DOM
caches can reduce this time.


© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                                 10
As we have seen, the code generation component can create an XSL document which uses the XSL-
over-Java API. We also provide a Java JSR 168 Portlet wrapper to the Dynamic XSL document. To
access this feature, select the “Java Code Generation” menu item and its “View As XSLT JSR-168
Portlet” sub-menu from the document node popup menu as seen here:




After prompting for an optional class name for the Portlet, the code generation component will
display two files. The first is the Portlet wrapper and the other is the Dynamic XSL document. As the
Portlet class will load the XSL file, ensure that you specify the correct path to the Dynamic XSL file as
determined by your Portlet engine.




© 2000-2007 ALT Mobile, LLC. XML Transcoding
<alt> XML Studio (TM) Version 6.0.0.122205a
http://altmobile.com                                                                                        11

Mais conteúdo relacionado

Destaque (8)

XO scholarship
XO scholarshipXO scholarship
XO scholarship
 
...Xd
...Xd...Xd
...Xd
 
Xiaobao台北印象
Xiaobao台北印象Xiaobao台北印象
Xiaobao台北印象
 
Xcz
XczXcz
Xcz
 
XML 101 presentation by Bill Kasdorf of Apex
XML 101 presentation by Bill Kasdorf of ApexXML 101 presentation by Bill Kasdorf of Apex
XML 101 presentation by Bill Kasdorf of Apex
 
Xneat Land
Xneat LandXneat Land
Xneat Land
 
Xmas Book Pg 5 + 6
Xmas Book Pg 5 + 6Xmas Book Pg 5 + 6
Xmas Book Pg 5 + 6
 
XL internet en Documenta 06
XL internet en Documenta 06XL internet en Documenta 06
XL internet en Documenta 06
 

Mais de Videoguy

Energy-Aware Wireless Video Streaming
Energy-Aware Wireless Video StreamingEnergy-Aware Wireless Video Streaming
Energy-Aware Wireless Video Streaming
Videoguy
 
Microsoft PowerPoint - WirelessCluster_Pres
Microsoft PowerPoint - WirelessCluster_PresMicrosoft PowerPoint - WirelessCluster_Pres
Microsoft PowerPoint - WirelessCluster_Pres
Videoguy
 
Proxy Cache Management for Fine-Grained Scalable Video Streaming
Proxy Cache Management for Fine-Grained Scalable Video StreamingProxy Cache Management for Fine-Grained Scalable Video Streaming
Proxy Cache Management for Fine-Grained Scalable Video Streaming
Videoguy
 
Free-riding Resilient Video Streaming in Peer-to-Peer Networks
Free-riding Resilient Video Streaming in Peer-to-Peer NetworksFree-riding Resilient Video Streaming in Peer-to-Peer Networks
Free-riding Resilient Video Streaming in Peer-to-Peer Networks
Videoguy
 
Instant video streaming
Instant video streamingInstant video streaming
Instant video streaming
Videoguy
 
Video Streaming over Bluetooth: A Survey
Video Streaming over Bluetooth: A SurveyVideo Streaming over Bluetooth: A Survey
Video Streaming over Bluetooth: A Survey
Videoguy
 
Video Streaming
Video StreamingVideo Streaming
Video Streaming
Videoguy
 
Reaching a Broader Audience
Reaching a Broader AudienceReaching a Broader Audience
Reaching a Broader Audience
Videoguy
 
Considerations for Creating Streamed Video Content over 3G ...
Considerations for Creating Streamed Video Content over 3G ...Considerations for Creating Streamed Video Content over 3G ...
Considerations for Creating Streamed Video Content over 3G ...
Videoguy
 
ADVANCES IN CHANNEL-ADAPTIVE VIDEO STREAMING
ADVANCES IN CHANNEL-ADAPTIVE VIDEO STREAMINGADVANCES IN CHANNEL-ADAPTIVE VIDEO STREAMING
ADVANCES IN CHANNEL-ADAPTIVE VIDEO STREAMING
Videoguy
 
Impact of FEC Overhead on Scalable Video Streaming
Impact of FEC Overhead on Scalable Video StreamingImpact of FEC Overhead on Scalable Video Streaming
Impact of FEC Overhead on Scalable Video Streaming
Videoguy
 
Application Brief
Application BriefApplication Brief
Application Brief
Videoguy
 
Video Streaming Services – Stage 1
Video Streaming Services – Stage 1Video Streaming Services – Stage 1
Video Streaming Services – Stage 1
Videoguy
 
Streaming Video into Second Life
Streaming Video into Second LifeStreaming Video into Second Life
Streaming Video into Second Life
Videoguy
 
Flash Live Video Streaming Software
Flash Live Video Streaming SoftwareFlash Live Video Streaming Software
Flash Live Video Streaming Software
Videoguy
 
Videoconference Streaming Solutions Cookbook
Videoconference Streaming Solutions CookbookVideoconference Streaming Solutions Cookbook
Videoconference Streaming Solutions Cookbook
Videoguy
 
Streaming Video Formaten
Streaming Video FormatenStreaming Video Formaten
Streaming Video Formaten
Videoguy
 
iPhone Live Video Streaming Software
iPhone Live Video Streaming SoftwareiPhone Live Video Streaming Software
iPhone Live Video Streaming Software
Videoguy
 
Glow: Video streaming training guide - Firefox
Glow: Video streaming training guide - FirefoxGlow: Video streaming training guide - Firefox
Glow: Video streaming training guide - Firefox
Videoguy
 

Mais de Videoguy (20)

Energy-Aware Wireless Video Streaming
Energy-Aware Wireless Video StreamingEnergy-Aware Wireless Video Streaming
Energy-Aware Wireless Video Streaming
 
Microsoft PowerPoint - WirelessCluster_Pres
Microsoft PowerPoint - WirelessCluster_PresMicrosoft PowerPoint - WirelessCluster_Pres
Microsoft PowerPoint - WirelessCluster_Pres
 
Proxy Cache Management for Fine-Grained Scalable Video Streaming
Proxy Cache Management for Fine-Grained Scalable Video StreamingProxy Cache Management for Fine-Grained Scalable Video Streaming
Proxy Cache Management for Fine-Grained Scalable Video Streaming
 
Adobe
AdobeAdobe
Adobe
 
Free-riding Resilient Video Streaming in Peer-to-Peer Networks
Free-riding Resilient Video Streaming in Peer-to-Peer NetworksFree-riding Resilient Video Streaming in Peer-to-Peer Networks
Free-riding Resilient Video Streaming in Peer-to-Peer Networks
 
Instant video streaming
Instant video streamingInstant video streaming
Instant video streaming
 
Video Streaming over Bluetooth: A Survey
Video Streaming over Bluetooth: A SurveyVideo Streaming over Bluetooth: A Survey
Video Streaming over Bluetooth: A Survey
 
Video Streaming
Video StreamingVideo Streaming
Video Streaming
 
Reaching a Broader Audience
Reaching a Broader AudienceReaching a Broader Audience
Reaching a Broader Audience
 
Considerations for Creating Streamed Video Content over 3G ...
Considerations for Creating Streamed Video Content over 3G ...Considerations for Creating Streamed Video Content over 3G ...
Considerations for Creating Streamed Video Content over 3G ...
 
ADVANCES IN CHANNEL-ADAPTIVE VIDEO STREAMING
ADVANCES IN CHANNEL-ADAPTIVE VIDEO STREAMINGADVANCES IN CHANNEL-ADAPTIVE VIDEO STREAMING
ADVANCES IN CHANNEL-ADAPTIVE VIDEO STREAMING
 
Impact of FEC Overhead on Scalable Video Streaming
Impact of FEC Overhead on Scalable Video StreamingImpact of FEC Overhead on Scalable Video Streaming
Impact of FEC Overhead on Scalable Video Streaming
 
Application Brief
Application BriefApplication Brief
Application Brief
 
Video Streaming Services – Stage 1
Video Streaming Services – Stage 1Video Streaming Services – Stage 1
Video Streaming Services – Stage 1
 
Streaming Video into Second Life
Streaming Video into Second LifeStreaming Video into Second Life
Streaming Video into Second Life
 
Flash Live Video Streaming Software
Flash Live Video Streaming SoftwareFlash Live Video Streaming Software
Flash Live Video Streaming Software
 
Videoconference Streaming Solutions Cookbook
Videoconference Streaming Solutions CookbookVideoconference Streaming Solutions Cookbook
Videoconference Streaming Solutions Cookbook
 
Streaming Video Formaten
Streaming Video FormatenStreaming Video Formaten
Streaming Video Formaten
 
iPhone Live Video Streaming Software
iPhone Live Video Streaming SoftwareiPhone Live Video Streaming Software
iPhone Live Video Streaming Software
 
Glow: Video streaming training guide - Firefox
Glow: Video streaming training guide - FirefoxGlow: Video streaming training guide - Firefox
Glow: Video streaming training guide - Firefox
 

XML Transcoding

  • 1. XML Transcoding XML transcoding is the term used to describe the process of parsing and extracting XML data. The XML transcoding technology is accessible through the DOM Browser which provides the developer with superior source and target document visualization ensuring correct selection of the source node (s) and placement into the target node—all through a point and click user interface. StableDOM—for HTML transcoding—along with the XML and SQL data transcoding technologies may used together to create an enterprise Mashup site. All of which are accessible through a point-and-click extraction capability. XML Transcoding Features The XML transcoding technology provides the following major capabilities: 1. Parses XML content and provides a W3C XML DOM. 2. Enables XPath, XSLT, or XQuery access to the W3C XML DOM view. 3. Provides a high-level XML Transcoding Java API to access nodes based on an XPath query. 4. Provides a DOM Browser user interface enabling point-and-click extraction of XML element, attribute, and text nodes. 5. Integrated with the XSLT/XQuery code generation component for transcoding from XML to XHTML, WML, and other XML document types such as RSS. 6. Integrated with the portal code generation component for transcoding from multiple HTML pages to XHTML and WML portlets based on the JSR 168 Portlet API (WSRP). 7. Supports URL and DOM caching for application specific cache management. Standard XML Parsing Pipeline The XML transcoding technology first parses the XML document and then a W3C DOM is made available. The Xerces parser is the default XML parser. This diagram presents a high-level view of the parsing pipeline: Alternate XML Parsing Pipeline In those cases where the source XML document is very large, the developer has the option to either use our high performance Regex Element Finder or Pull Parser Component. Both of these technologies are better suited to the memory demands and speed requirements needed to process © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 1
  • 2. large XML documents. Both provide better loading/searching/filtering APIs than the classic SAX or DOM parsers and APIs. Nonetheless, these APIs can return DOM nodes and are therefore fully interoperable with downstream technologies such as XSLT. For more information about the <alt> Pull Parse technology and some of its capabilities, please review the product documentation for the Pull Parse Tool which leverages the underlying Pull Parse technology: http://altmobile.com/pdf/Pull%20Parse%20Tool.pdf. Accessing the W3C DOM After completing the parsing and a W3C XML DOM is made available, you can access this DOM with 5 different technologies depending on your needs: 1. W3C XML DOM API. 2. XPath access through Jaxen. 3. XSLT access through Xalan. 4. XQuery access through Saxon. 5. XML Transcoding Java API which is based on common access patterns. This diagram depicts the XML parsing pipeline and application access technologies: Accessing the DOM with the XML Transcoding Java API The XML Transcoding access API is implemented by the DOMUtil class in the package com.altmobile.platform.util.xml.dom and provides the following method signature list: 1. static public String getContent (String urlString, String xpathString) 2. static public Node getNode (String urlString, String xpathString) Accessing the DOM with the Transcoding XSL-Over-Java API The XML Transcoding Java API may also be accessed from the user defined function mechanism provide by the Xalan XSLT engine. There are two functions to extract XML content using XSLT. These two functions were designed to mimic the XSLT “copy” pattern: 1. public static String getContent(String urlString, String xpathString) 2. public static Node getNode(String urlString, String xpathString) The function getContent() will copy the text content of a node and getNode() will perform a deep copy of the node. © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 2
  • 3. The following screen shots highlight the user function declaration: The function getContent() should be used with the <xslt:value-of> element and the function getNode() should be used with the <xslt:copy-of> element. © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 3
  • 4. Point-and-Click Extraction Though the developer can manually type the code to perform the XML parsing and extraction using languages such as XSLT or XQuery, the DOM Browser can automate this process with point-and-click extraction and code generation. As seen in this screen shot, the DOM Browser allows visual extraction: The Transcoding Development Process To transcode your XML into RSS, XHTML or WML, you should follow these steps: 1. Construct your target document in the DOM Browser, or load a valid XML document into the DOM Browser. For example, using an RSS sample document as seen here: © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 4
  • 5. We want to dynamically access a remote XML document and extract content and place it as the child of the link element. 2. Decide which elements and text content should be extracted from the external XML document. 3. Select the “Import Last Child from XML Source” menu item from the parent element of the to-be-imported node as seen here: © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 5
  • 6. 4. This will launch a new empty DOM Browser, allowing you to type the URL of the remote document in the URL address field and extract a DOM element, an element’s text content, or an attribute’s content as needed. © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 6
  • 7. In the below screen capture, we want to extract the document_url element content: To save space for this screen shot, we are abbreviating the text node content. © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 7
  • 8. To learn more about the space-saving technologies of the DOM Browser, view its documentation at http:// altmobile.com/pdf/DOM%20Browser.pdf After selecting the “Extract Node Value” menu item from the popup: our target document will look like this: © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 8
  • 9. To save space for this screen shot, we are abbreviating the text node content. To learn more about the space-saving technologies of the DOM Browser, view its documentation at http:// altmobile.com/pdf/DOM%20Browser.pdf 5. Select the “Transform to Dynamic XSLT Source” menu item which cascades off the “XSLT” menu item which is found in the document node popup menu as seen here: This displays the Dynamic XSLT source code which contains instructions to create both the static RSS and dynamic RSS using the special transcoding function getContent(url, xpath) as seen here: © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 9
  • 10. Creating a Mashup or Web Portal through XML Transcoding As mentioned before, the XML transcoding technology supports transcoding any element, attribute or text value. As seen in the diagram below, you can transcode XML content from multiple documents: In fact, you use the same development process to selectively transcode content from different documents, HTML sites, and SQL databases. The only real-world limitation is the time it takes to access the remote documents and the processing time needed in the parsing pipeline. URL and DOM caches can reduce this time. © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 10
  • 11. As we have seen, the code generation component can create an XSL document which uses the XSL- over-Java API. We also provide a Java JSR 168 Portlet wrapper to the Dynamic XSL document. To access this feature, select the “Java Code Generation” menu item and its “View As XSLT JSR-168 Portlet” sub-menu from the document node popup menu as seen here: After prompting for an optional class name for the Portlet, the code generation component will display two files. The first is the Portlet wrapper and the other is the Dynamic XSL document. As the Portlet class will load the XSL file, ensure that you specify the correct path to the Dynamic XSL file as determined by your Portlet engine. © 2000-2007 ALT Mobile, LLC. XML Transcoding <alt> XML Studio (TM) Version 6.0.0.122205a http://altmobile.com 11