Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 24th, 2015, 10:37 AM
Authorized User
 
Join Date: Jan 2006
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
 
Old March 31st, 2015, 08:24 AM
Registered User
 
Join Date: Mar 2015
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
 
Old September 6th, 2015, 10:44 PM
Registered User
 
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?
 
Old September 7th, 2015, 03:30 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 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
 
Old September 7th, 2015, 09:42 AM
Registered User
 
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?
 
Old September 7th, 2015, 10:00 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 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
 
Old September 7th, 2015, 01:03 PM
Registered User
 
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.
 
Old September 8th, 2015, 02:46 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
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?
 
Old September 8th, 2015, 09:16 AM
Registered User
 
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.
 
Old September 9th, 2015, 05:59 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 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





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 10: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 03:10 AM
About XML-DSO on IE5 programming reference qualsn Wrox Book Feedback 1 December 5th, 2003 10:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.