This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes What is the difference between URL,URI And URN? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "What is the difference between URL,URI And URN?" Watch "What is the difference between URL,URI And URN?" New topic
Author

What is the difference between URL,URI And URN?

sumanta panda
Ranch Hand

Joined: Jun 23, 2008
Posts: 224
What is the difference between URL,URI And URN?
Kindly give an real example for this thing.
[ June 25, 2008: Message edited by: sumanta panda ]
Marcus Green
arch rival
Rancher

Joined: Sep 14, 1999
Posts: 2813
What is your current understanding of these terms?


SCWCD: Online Course, 50,000+ words and 200+ questions
http://www.examulator.com/moodle/course/view.php?id=5&topic=all
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Welcome to JavaRanch, sumanta panda


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
sreeprasasd govindankutty
Greenhorn

Joined: Jun 05, 2008
Posts: 5
URI

A URI identifies a resource either by location, or a name, or both. More often than not, most of us use URIs that defines a location to a resource. The fact that a URI can identify a resources by both name and location has lead to a lot of the confusion in my opionion. A URI has two specializations known as URL and URN.

URN

A URI identifies a resource by name in a given namespace but not define how the resource maybe obtained. This type of URI is called a URN. You may see URNs used in XML Schema documents to define a namespace, usually using a syntax such as:

<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:example"

Here the targetNamespace use a URN. It defines an identifier to the namespace, but it does not define a location.

URL

A URL is a specialization of URI that defines the network location of a specific resource. Unlike a URN, the URL defines how the resource can be obtained. We use URLs every day in the form of http:sun.com, etc. But a URL doesn�t have to be an HTTP URL, it can be ftp://sun.com, smb://sun.com, etc.


Sreeprasad,<br />SCJP
Juwonlo Ibigbami
Ranch Hand

Joined: Nov 03, 2006
Posts: 83
Thanks, sreeprasasd, I thought I knew it but I got to know it more explicitly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the difference between URL,URI And URN?
 
Similar Threads
Some Basic Queries
URI vs URL
What is the difference between URI,URL and URN
URN,URI and URL
difference between URL and URI