الثلاثاء، 20 يناير 2009

What Is XSLT

What Is XSLT
XSLT is a declarative programming language, written in XML, for converting XML to some other
output. Often the output is XML or HTML, but in principle, XSLT can produce arbitrary output from any given XML source document

In a common scenario, two companies need to exchange XML documents electronically but for
historical reasons have differences in the structures of basic documents such as invoices and purchase orders

Procedural versus Declarative Programming

When using a procedural programming language such as JavaScript, you tell the computer what you
want to do step by step. You might define a function, and then define each thing that the computer is supposed to do, assigning a variable, iterating through a loop, and so on. The mental picture of what the function is supposed to achieve exists only in your mind

The procedural programming approach differs from declarative programming in that you tell the computer what you want to achieve. XSLT resembles SQL in that respect. For example, in SQL you tell the relational database management system (RDBMS) to SELECT certain columns, but you don’t expect to tell it how to retrieve the desired data. XSLT is similar. You specify what the XSLT processor is to create each time it comes across a particular pattern in the source tree

XSL - More Than a Style Sheet Language

XSL consists of three part

XSLT - a language for transforming XML documents

XPath - a language for navigating in XML documents

XSL-FO - a language for formatting XML documents


XSLT Uses XPath ...HOW ? PLZ GIVE ME CHANCE TO SAY HOW :) OK ..OK

XSLT uses XPath to find information in an XML document. XPath is used to navigate through elements and attributes in XML documents

 XSLT uses XPath to define parts of the source document that should match one or more predefined templates. When a match is found, XSLT will transform the matching part of the source document into the result document


In next article i will make simple example for XSLT and show its component ...Salam Alikm now

الاثنين، 19 يناير 2009

The Difference Between CSS and XSLT

The Difference Between CSS and XSLT
They're Both Style Sheets, Right? YES
Many people believe that CSS is for HTML and XSL or XSLT is for XML, but that's not strictly true. While both are style sheets, they serve two vastly different purposes

The reason is that CSS is much easier to use, easier to learn, thus easier to maintain and cheaper. There are WYSIWYG editors for CSS and in general there are more tools for CSS than for XSL. But CSS's simplicity means it has its limitations. Some things you cannot do with CSS, or with CSS alone. Then you need XSL, or at least the transformation part of XSL

What CSS Can Do
  • Modify the font size, color, family, and style of text in markup
  • Define the location and size of an element
  • Change the background image and color of elements
  • Create a new look and feel for markup pages to display on the Web

What CSS Cannot Do

  • Change the order of elements in a document
  • Make computations based on the content of the document
  • Add content to the document
  • Combine multiple documents into one

What XSLT Can Do

  • convert data in a standard XML format to SQL statements, tab-delimited text files, or other database formats for data sharing
  • transform XSLT style sheets into new style sheets
  • turn Web pages (written in XHTML) to VoiceML or XHTML Basic for handheld devices
  • add CSS style sheets to XML documents for view in a browser

If all you're looking for is a style sheet to manipulate the way your content looks in a document, then you should use CSS. But if you're looking to actually transform one document into another, then XSLT is your tool


Diagram of the role of XSL and CSS in rendering HTML and  XML documents

This diagram shows the role of XSL and CSS. XML documents can be rendered in three different ways: (1) if the document doesn't have to be transformed, use CSS. Otherwise, use XSL-T, the transformation language of XSL, in one of two ways: either (2)generate the style properties together with the rearranged text, using a sub-language of XSL called XSL-FO (XSL Formatting Objects); or (3) generate a new XML or HTML document and provide a CSS style sheet for that new document.

source

الجمعة، 16 يناير 2009

XPath Tutorial


To Read  More about the Expressions,Predicates and Functions  ==> Hit This Link

XPath
  To Read how to use XPath in .Net  ==> Hit This Link

 

السبت، 10 يناير 2009

XML Namespace

Namespace help to avoid conflict between two xml objects (xml data) of the same name.

In the following example we have 2 roots called table so how we can differentiate between them? And if you make search in your Xml document with the 2 same name how to determine the element you want!! So we can solve this problem by using namespace prefixes, follow this structure

First: 2 root with no namespace

Problem with prefix

After we differentiate between 2 Xml objects using prefix we also have a problem with prefix, imagine one of department of your company choose the same name for namespace like other department in the same company that choose the same name.

 

Solution

Use Uniform Resource Identifier by using URLThe purpose is to give the namespace a unique name. However, often companies use the namespace as a pointer to a web page containing namespace information

The namespace is defined by the xmlns attribute in the start tag of an element

The namespace declaration has the following syntax. xmlns:prefix="URI"


الاثنين، 5 يناير 2009

.Net Video

الجمعة، 2 يناير 2009

Benefits of XML Schemas

Benefits of XML Schemas
  • XML Schemas are created using basic XML, while DTDs utilize a separate syntax.
  • XML Schemas fully support the Namespace Recommendation.
  • XML Schemas enable you to validate text element content based on built-in and user-defined datatypes.
  • XML Schemas enable you to more easily create complex and reusable content models.
  • XML Schemas enable the modeling of programming concepts such as object inheritance and type substitution

 

97 Things Every Software Architect Should Know

 97Things Every Software Architect Should Know

The following are the 97 axioms selected for the book, 97 Things Every Software Architect Should Know, which will be published by O'Reilly Media in early 2009. The contents are now being edited for publishing - you can see them here. All edits will be contributed back to the 97 Things web site on this page.

read more
Here's agood blog that interested about software Architect