Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 24th, 2015, 10:37 AM
Authorized User
Points: 56, Level: 1
Points: 56, Level: 1 Points: 56, Level: 1 Points: 56, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning XML: Where and how can I get the XML programming started?

Hi all,
I bought a copy of the Book "Beginning XML 2nd Edition" written by David Hunter, et. al. (published by Wrox) many years ago. I learned the basic stuff of XML, DTD and DOM before. Recently, I reviewed the book and wanted to do my XMY programming again. Now I am very rusty in doing XML programming. I try to do my first XML Schema by using the name5.xsd
CODE]<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema""
targetNamespace="http://www.wrox.com/name" xmlns:target="http://www.wrox.com/name"
elementFormDefault="qualified">
<element name="name">
<complexType>
<sequence>
<element name="first" type="string"/>
<element name="middle" type="string"/>
<element name="last" type="string"/>
</sequence>
</complexType>
</element>
</schema>
[/code]

and name5.xml:
Code:
<?xml version="1.0"?>
<name
  xmlns=http://www.wrox.com/name"
  xmlns:xsi="http://www.wrox.org/2001XMLSchema-instance"
  xsi:schemaLocation="http://www.wrox.com/name name5.xsd"
  title="Mr.">
    <first>John</first>
    <middle>Frizgerald</middle>
    <last>Doe</last>
</name>
Where and how can I execute these 2 files (name5.xsd and name5.xml)?

Please kindly help and advise me where and how I can get the xml programming Started and have the name5.xsd and name5.xml executed.

Thanks in advance,
Scott Chang
Reply With Quote
  #2 (permalink)  
Old March 31st, 2015, 08:24 AM
Registered User
Points: 7, Level: 1
Points: 7, Level: 1 Points: 7, Level: 1 Points: 7, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2015
Location: Chennai
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default XML process

Hello,

In real time using xml for mandatory field validation in forms..
Also servlet mapping is done here...

It is easy and fast executable codes
Reply With Quote
  #3 (permalink)  
Old September 6th, 2015, 10:44 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2015
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Good evening.

I tried to combine XHTML with SVG. It worked fine until I started adding namespaces. After much searching, I found something called Namespace-based Validation Dispatching Language (NVDL). Has anyone ever heard of this? Can it be used in conjunction with the eXist database program?
Reply With Quote
  #4 (permalink)  
Old September 7th, 2015, 03:30 AM
mhkay's Avatar
Wrox Author
Points: 18,252, Level: 58
Points: 18,252, Level: 58 Points: 18,252, Level: 58 Points: 18,252, Level: 58
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,929
Thanks: 0
Thanked 281 Times in 276 Posts
Default

>Has anyone ever heard of this?

Yes. But without knowing your problem (beyond the fact that "it doesn't work fine"), it is impossible to know whether NVDL is the answer.

>Can it be used in conjunction with the eXist database program?

All XML technologies can be used "in conjunction with" each other if you try hard enough, but I don't know if there is any close integration.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Reply With Quote
  #5 (permalink)  
Old September 7th, 2015, 09:42 AM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2015
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is my HTML document:

<html>
<head>
<title>SVG Ellipse</title>
<link rel = "stylesheet" type = "text/css" href = "SVG_Ellipse.css">
</link>
<script language = "javascript" src = "SVG_Ellipse_Test_1.js">
</script>
</head>
<body onload = "Setup()">
<svg id = "Image_Box">
<ellipse id = "My_Ellipse">
</ellipse>
</svg>
<input id = "My_Data" type = "text">
</input>
</body>
</html>

When I open this document, everything works fine. But when I change this to an XHTML document and add namespaces for the XHTML and the SVG, it stops working. Let me show you:

<?xml version = "1.0" encoding = "UTF-8" standalone = "no"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" >
<head>
<title>SVG Ellipse</title>
<link rel="stylesheet" type="text/css" href="http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.css"/>
<script language="javascript" type = "text/javascript"src="http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse_Test_2.js"/>
</head>
<body onload="Setup()">
<svg:svg id="Image_Box">
<svg:ellipse id="My_Ellipse"/>
</svg:svg>
<input id="My_Data" type="text">
</input>
</body>
</html>

I was hoping the Namespace-based Validation Dispatching Language would bridge the missing gap. If so, how would this work with the eXist database?
Reply With Quote
  #6 (permalink)  
Old September 7th, 2015, 10:00 AM
mhkay's Avatar
Wrox Author
Points: 18,252, Level: 58
Points: 18,252, Level: 58 Points: 18,252, Level: 58 Points: 18,252, Level: 58
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,929
Thanks: 0
Thanked 281 Times in 276 Posts
Default

You say "it stops working". What is "it" (ie. what are you doing with the document? You say you're opening it, but with what? A browser? Which browser?), and how exactly does it fail?
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
Reply With Quote
  #7 (permalink)  
Old September 7th, 2015, 01:03 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2015
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've tried to open this document in Google Chrome and in Firefox. The textbox appears, but the SVG Ellipse won't.
Reply With Quote
  #8 (permalink)  
Old September 8th, 2015, 02:46 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,133
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Does this help: http://stackoverflow.com/questions/2...html-documents

For a true XHTML file you may be missing the DocType declaration perhaps?
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
Reply With Quote
  #9 (permalink)  
Old September 8th, 2015, 09:16 AM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2015
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No it doesn't. I have a feeling that I will have to save one copy of my document in regular html so it will work and another copy in xml so I can validate it. I think this is a stupid solution and I think someone should create an alternate solution to this problem.
Reply With Quote
  #10 (permalink)  
Old September 9th, 2015, 05:59 AM
Friend of Wrox
Points: 6,522, Level: 34
Points: 6,522, Level: 34 Points: 6,522, Level: 34 Points: 6,522, Level: 34
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Nov 2007
Location: Germany
Posts: 1,220
Thanks: 0
Thanked 237 Times in 236 Posts
Default

How do you open the document in the browser, do you open it from the file system or do you load it from a HTTP server? If you want to use XML from thefile system then you need to make sure you use a suffix like .xml or .xhtml, otherwise the browser will not use its XML parser. If loaded from a HTTP server the document needs to be served as text/xml or application/xml or application/xhtml+xml.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting started with Eclipse Chapter1 of programming mrguru2012 BOOK: Beginning Android Application Development 3 November 11th, 2011 09:19 AM
Just getting started with server side programming. fredzbooks BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 August 4th, 2008 09:24 PM
VB xml Programming helgaana1 Beginning VB 6 2 April 10th, 2005 11:03 AM
the source code of "Beginning C# XML" paggie All Other Wrox Books 6 March 4th, 2005 02:10 AM
About XML-DSO on IE5 programming reference qualsn Wrox Book Feedback 1 December 5th, 2003 09:13 AM



All times are GMT -4. The time now is 02:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.