Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts

Saturday, April 28, 2012

XML ,HTML ,XSD,XSLT & DTD

XML and HTML were designed with different goals:


XML was designed to transport and store data, with focus on what data is
HTML was designed to display data, with focus on how data looks
That is because the XML language has no predefined tags.The tags used in HTML are predefined.
XML is case sensitive.

Its better to use element other than attribute in XML (Avoid XML attributes)
----------
Xml is the game, while Xsd is the game rules.
Using an XSD, you can use XML validators to check if your XML file complies to the rules stated in XSD. This is good if you are working with different persons/teams/companies so you can make sure that everyone creates their XML to the same rules.
the XSD defines the schema where the structure of how data is to be represented within the XML file is stored.
 
DTDS vs Schema
---------------
DTDs and Schemas both perform the same basic functions: 
First, they both declare a laundry list of elements and attributes.
Second, both describe how those elements are grouped, nested or used within the XML. In other words, they declare the rules by which you are allowing someone to create an XML file within your workflow, and
Third, both DTDs and schemas provide methods for restricting, or forcing, the type or format of an element. For example, within the DTD or Schema you can force a date field to be written as 01/05/06 or 1/5/2006.
But, what’s the difference between the two? Which one should you use for your project?
The answer: it depends. DTDs are better for text-intensive applications, while schemas have several advantages for data-intensive workflows. Schemas are written in XML and thusly follow the same rules, while DTDs are written in a completely different language.  
Sample DTD
---------      
               
Note: See how the DTD declares an element called “employees” and how that element is constructed of the elements: 
“Efirstname”, “Elastname”, “Etitle”, “Ephone”, “Eemail” in that specific order. 
The notation #PCDATA indicates what kind of information the element can contain.

XSL - eXtensible Stylesheet Language. A language that can be used to style an XML file for display in a Web browser. 
XSLT - eXtensible Stylesheet Language. A language that can be used to transform XML into HTML, XHTML, text or even a PDF.

Why XML
------
XML do  much the same way databases do. Why? We already have database-driven websites, what’s the need for a new language that favors data over design? The answer can be found in two words: access and repurposing. 
Access

The problem with many existing Websites is that data stored in databases is lost to the efficiencies of the Web. In other words, it is difficult if not impossible to search and find the information contained within thousands of files and records. Data stored in some web databases is simply ignored by search engines. As corporations, government, newspapers, magazines and professional associations try harder and harder each day to make volumes of news, facts, and other data available to their customers and the general public, there was an obvious need for a new solution, but a standardized, non-proprietary one.
Repurposing
For example, you can take the new car brochure you just picked up at the dealership and make it available on the Internet, and vice versa.
You might say, “I already do this. I simply print the brochure as a PDF and upload it to the website.”
Using PDFs, although universal, is not an ideal solution because it requires users to download and install the Acrobat plug-in and then to download the PDF, both of which can take tedious minutes, especially on dial-up connections. What developers have been looking for is a browser-based solution that can work without additional plug-ins and download times.
Enter XML. Unlike typical databases, XML stores the data in plain text. Such information can be made available to search engines more easily, and with the help of other evolving techniques and technologies, such as XSL and CSS, the data can be presented in a variety of interesting and appealing ways.
--------
 It is possible to use CSS to format an XML document.
Formatting XML with CSS is not the most common method.
XSLT is the recommended style sheet language of XML.
XSLT (eXtensible Stylesheet Language Transformations) is far more sophisticated than CSS.
XSLT can be used to transform XML into HTML
 _______________________________

A simple element is an XML element that can contain only text. It cannot contain any other elements or attributes.

 
Simple elements cannot have attributes. If an element has attributes, it is considered to be of a complex type.
 Restrictions are used to define acceptable values for XML elements or attributes
 
A complex element is an XML element that contains other elements and/or attributes.
There are four kinds of complex elements:
empty elements
elements that contain only other elements
elements that contain only text
elements that contain both other elements and text
An empty complex element cannot have contents, only attributes.
 
--------------------------------------------------------------------------------
An "elements-only" complex type contains an element that contains only other elements
   
 
A mixed complex type element can contain attributes, elements, and text
We can control HOW elements are to be used in documents with indicators.
There are seven indicators:
Order indicators:
All
Choice
Sequence
Occurrence indicators:
maxOccurs
minOccurs
Group indicators:
Group name
attributeGroup name
--------------------------------------------------------------------------------
XML Schema to define XML structures and data types
XSLT to transform XML data
SOAP to exchange XML data between applications
WSDL to describe web services
RDF to describe web resources
XPath and XQuery to access XML data
SMIL to define graphics

Friday, November 25, 2011

WITSML,PRODML,RESQML



WITSML Standards
WITSML™ (Wellsite Information Transfer Standard Markup Language) is an industry initiative to provide open, non-proprietary, standard interfaces for technology and software that monitor and manage wells, completions and workovers.

WITS ≠ WITSML


While the goal of each of these standards is essentially the same—the ability to easily transfer drilling data—the technology is not.


Wellsite Information Transfer Specification (WITS) is an industry standard from the mid 1980s that uses a binary file format for transferring wellsite drilling data.

WITSML is Web-based and built on XML technology, which is both platform- and language-independent.

Some implementations of WITS may still exist, but all new development should be done using WITSML.

Example of WITSML

------------------------
PRODML Standards
PRODML (Production Markup Language) is an industry initiative to provide open, non-proprietary, standard interfaces between software tools used to monitor, manage and optimize hydrocarbon production.( PRODuction xML)

PRODML standards:

    * Make integration of these technologies possible, enabling near-real-time production optimization and moving closer to realizing the benefits of the digital oilfield.
    * Focus on the technology from the reservoir-wellbore boundary to the custody transfer point, as well as integration with other domain standards such as WITSML and RESQML.
    * Are a low-cost, low-risk, and highly innovative environment for the configuration and running of advanced optimization processes.


------------------------------
RESQML Standards
RESQML™ is an industry initiative to provide open, non-proprietary data exchange standards for reservoir characterization, earth and reservoir models.


RESQML is the exchange format for transferring earth model data between applications in a vendor neutral, open and simple format.


RESQML benefits not only from the immense experience gained over the years with RESCUE, but also from the vision of new developments. RESQML will enable feedback loops from simulation to seismic improving today’s usage of time-lapse seismic. Gridding technologies such as unstructured gridding or micro-fracture descriptions, along with features like streamlines, are further enhancements that can be more easily integrated into RESQML.


Many people have experienced data corruption when transferring data from one system to another, such as well trajectories losing datums, 3D grids getting changed from time to depth, horizon data being damaged in the data transfer.
When you find that your wells are on the other side of the reservoir it is particularly annoying,

Data in RESQML format can include a gridded volume, data about horizons, static information, time data (for a simulation), units being used.

The system can record data about connections, not just the geometry of the reservoir model. For example, it can describe which cells specific wells intersect, and where the faults are.

If a gridded volume is imported into another piece of reservoir simulation software which doesn’t know that a fault exists, the software will create a simulation on the basis that fluid can flow freely from one cell to an adjacent one, without knowing that it would be blocked by a fault.

RESQML can handle faults modeled in both pillars and stair steps. It can include data about flows and temperatures.

RESQML can also manage data about multiple reservoirs which are connected by the same well.
---------