473,804 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

the reference of the content of XML element

the reference of the content of XML element

In XSD, how can I specify the content of an element refers to the
content of another element in an xml file?

Thanks a lot!

May 31 '06 #1
5 1439
mavis wrote:
In XSD, how can I specify the content of an element refers to the
content of another element in an xml file?


Make the value a keyref or idref to that other element? Or make the
value an XPath which can be used to find that element?

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 31 '06 #2
Thanks a lot ,

Could you instruct how to refer to another element if it is not key or
unique by using xpath?

Joe Kesselman wrote:
mavis wrote:
In XSD, how can I specify the content of an element refers to the
content of another element in an xml file?


Make the value a keyref or idref to that other element? Or make the
value an XPath which can be used to find that element?

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry


May 31 '06 #3
mavis wrote:
Could you instruct how to refer to another element if it is not key or
unique by using xpath?


An XPath is a description of how to find information within a document
-- a simple query operation, if you want to look at it that way.

It's up to the environment to say which document; there's no reason your
system can't use an XPath within a doc to refer to another part of that
doc. XSLT stylesheets sometimes do exactly this, examining themselves to
(for example) do a table lookup. In XSLT, any XPath starting with a call
to the no-arguments version of the document() function is a request to
search the stylesheet document.

Of course, actually following the XPath to the node it refers to will
require running an XPath interpreter, giving it the approrpiate context
information. The TrAX APIs are one semi-standardized way of doing that
in Java; DOM Level 3 also introduces its own XPath API.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 31 '06 #4
Thanks. I mean how can we deifne this in the schema file? For example,
in the XSD file, set the default value of an element to be the content
from another element??

Thanks!
Joe Kesselman wrote:
mavis wrote:
Could you instruct how to refer to another element if it is not key or
unique by using xpath?


An XPath is a description of how to find information within a document
-- a simple query operation, if you want to look at it that way.

It's up to the environment to say which document; there's no reason your
system can't use an XPath within a doc to refer to another part of that
doc. XSLT stylesheets sometimes do exactly this, examining themselves to
(for example) do a table lookup. In XSLT, any XPath starting with a call
to the no-arguments version of the document() function is a request to
search the stylesheet document.

Of course, actually following the XPath to the node it refers to will
require running an XPath interpreter, giving it the approrpiate context
information. The TrAX APIs are one semi-standardized way of doing that
in Java; DOM Level 3 also introduces its own XPath API.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry


Jun 1 '06 #5
mavis wrote:
Thanks. I mean how can we deifne this in the schema file? For example,
in the XSD file, set the default value of an element to be the content
from another element??


No can do. This is something the application needs to deal with, not the
schema. Schemas are best thought of as constraining and typechecking
documents; copying a value from one place to another is outside their scope.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Jun 1 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
9716
by: Dave Kuhlman | last post by:
Suppose that I have content that looks like what I've included at the end of this message. Is there something in the standard Python library that will help me parse it, break into the parts separated by the boundary strings, extract headers from each sub-part, etc? Do I need to add something like the following to the beginning? Content-Type: multipart/related; type="multipart/alternative";
17
2422
by: eric.nave | last post by:
What is the correct way to find all the form elements in a particular div? I'd like to be able to loop through them and disable them. For example: <form> <div id="div1"> <input type=text name="a"> <input type=text name="b"> </div>
3
1379
by: bill joyce | last post by:
I have installed an assembly in the GAC ( a DAL), now I want to make a reference to it in my Business Obj. This is one way I found out how to do it is there another way? <system.web> <compilation debug='true'> <assemblies> add assembly="DAL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=17177e16a4b86577" />
4
4130
by: Mike [MCP VB] | last post by:
Hi, I hope this is the right place to ask. I have an xml file thus: <?xml version="1.0" encoding="UTF-8"?> <Message xmlns="urn:myurl-org:ns2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:myurl-org:ns2 ...\Schemas\schema.xsd" type="Message"> <id root="7DC0FFE7-1224-4598-8F20-3B7662D416A1"/>
4
2731
by: Brian | last post by:
I am trying to use a web service from a non Microsoft product. When I do a "Add Web Reference" from the Visual Studio dialog box, a request is generated and received by the web services supplier. This request contains information in the "Authorization:" header. Valid WSDL is returned and the dialog box correctly shows the services and methods available. However, a second request is also sent to the WS supplier for the same information. This...
5
10338
by: Mike Logan | last post by:
I used WSDL.exe to generate a client side web proxy for a web service, called the web service, got the results but an array returned by the web service is not in the results. However if I use "Add Web Reference" for the same service the same function works appropriately. Here is the client proxy generated from WSDL.exe <System.Web.Services.Protocols.SoapDocumentMethodAttribute("capeconnect:AppSec:AppSecPortType#getApplicationUsers",
0
5116
by: Richard Gregory | last post by:
Hi, I have the wsdl below, for an Axis web service, and when I select Add Web Refernce in Visual Studio the proxy is missing a class representing the returnedElementsType (see reference.cs below the wsdl). This complex type is a collection of another complex type(elementType), and the Reference.cs has an array of these rather than the single returnedElementsType. If If I want to be able to obtain these elements from the SOAP response I...
8
5916
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web clients (Internet Explorer). My flash content was originally brought in via the “flash satay” method, but I have since used some server-side magic do deliver one <objecttag
2
2892
by: r_ahimsa_m | last post by:
Hello, I am learning PHP5. I need to parse XML file and I found a solution in some book on PHP5 ("PHP5 Programming" by Rasmus Lerdors and others). Unfortunately I have two problems that I don't understand: Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of xml_set_object(). If you would like to enable call-time pass-by-reference, you can set...
0
9715
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10352
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10354
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9175
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5535
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3835
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.