|
-
Mar 16th, 2001, 09:15 PM
#1
Thread Starter
Addicted Member
I am an absolute newby to XML. Would you please explain what a namespace is, and how it is used?
Code:
<?xml version="1.0"?>
<HTML xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<BODY STYLE="font-family:Arial, helvetica, sans-serif; font-size:12pt;
background-color:#EEEEEE">
<xsl:for-each select="CATALOG/CD">
<DIV STYLE="background-color:teal; color:white; padding:4px">
<SPAN STYLE="font-weight:bold; color:white"><xsl:value-of select="TITLE"/></SPAN>
- <xsl:value-of select="ARTISTe"/>
</DIV>
</xsl:for-each>
</BODY>
</HTML>
In the above XSL what is the use of http://www.w3.org/TR/WD-xsl ? Do I have to be connected to the internet to view the results? What does the above XSL mean?
-
Mar 20th, 2001, 05:06 AM
#2
Fanatic Member
Namespace
A mechanism that allows developers to uniquely qualify the element names and relationships and to make these names recognizable. By doing so, they can avoid name collisions on elements that have the same name but are defined in different vocabularies. They allow tags from multiple namespaces to be mixed, which is essential if data is coming from multiple sources. Namespaces ensure that element names do not conflict, and clarify who defined which term.
A namespace identifies an XML vocabulary defined within a URN. An attribute on an element, attribute, or entity reference associates a short name with the URN that defines the namespace; that short name is then used as a prefix to the element, attribute, or entity reference name to uniquely identify the namespace. Namespace references have scope. All child nodes beneath the node that specifies the namespace inherit that namespace. This allows nonqualified names to use the default namespace.
XSL (Extensible Stylesheet Language)
A language used to transform XML-based data into HTML or other presentation formats, for display in a Web browser. The transformation of XML into formats, such as HTML, is done in a declarative way, making it often easier and more accessible than through scripting. In addition, XSL uses XML as its syntax, freeing XML authors from having to learn another markup language.
In contrast to CSS, which "decorates" the XML tree with formatting properties, XSL transforms the XML tree into a new tree (the HTML), allowing extensive reordering, generated text, and calculations—all without modification to the XML source. The source can be maintained from the perspective of "pure content" and can simultaneously be delivered to different channels or target audiences by just switching style sheets.
XSL consists of two parts, a vocabulary for transformation and the XSL Formatting Objects.
I would suggest yo go to vbxml.com or xml.com to see the sample code before you get stuck in!
-
Mar 21st, 2001, 06:56 AM
#3
Thread Starter
Addicted Member
Thanks sir, I'll do that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|