473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

schematron question

I want to ensure that a reference from one element to another is valid,
e.g

<character name="sleepy">
<friends_with name="doc"/>
</character>

<character name="sneezy">
<friends_with name="sleepy"/>
</character>

I want to ensure that the value of the name attribute in "friends_with"
actually exists somewhere in the file as a <character name> somewhere.
(if the above were the entire file, then the first element would be
invalid since "doc" is not a charc ater name in the file)

Can I do this with schematron?
Sep 16 '05 #1
1 1254
That can be done in W3C XML Schema (Presumably RelaxNG as well) using keys and
keyrefs. You could do it with Schematron if you really want to, but this is
not a case where you have to use it.

On Fri, 16 Sep 2005 21:52:15 +0200, shaun roe <sh*******@wanadoo.fr> wrote:
I want to ensure that a reference from one element to another is valid,
e.g

<character name="sleepy">
<friends_with name="doc"/>
</character>

<character name="sneezy">
<friends_with name="sleepy"/>
</character>

I want to ensure that the value of the name attribute in "friends_with"
actually exists somewhere in the file as a <character name> somewhere.
(if the above were the entire file, then the first element would be
invalid since "doc" is not a charc ater name in the file)

Can I do this with schematron?


Sep 17 '05 #2

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

Similar topics

3
by: gabriel | last post by:
Is there such a parser out there? I'm using XMLSPY.. can its native parser handle imbedded Schematron and validate an instace against it? /Gabriel
3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
0
by: disteve | last post by:
Can Schematron validate that an attribute value is unique within an XML document? If so, what would the assert or report tests be? See below. Ex. <ALLOCATION type="CLASS" name="CLASS A"><!--...
0
by: jean-gert nesselbosch | last post by:
hello everybody, does anybody know where to get an xslt-implementation of ISO-schematron ? I want to make use of the "let"-feature (that is : using variables inside a schematron-schema). ...
1
by: Goodmannewz | last post by:
I am a beginner in XML schema. Could you please give me some ideas to compare the feature of DTD, XSD, SCHEMATRON RELAX NG in validate aspect? And could you please recommend some good material in...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
0
by: Nirav | last post by:
Hi, Is there any implementation which supports inserting of relative elements in the diagnostics of a schematron template? According to the standards, standard XPath messages in the diagnostics...
1
by: Torsten Munkelt | last post by:
Hi, I want to validate an XML document applying a combination of RELAX NG and Schematron. I have not found an appropriate validator. Would you please send me links to such validators. I would...
0
by: patrik.nyman | last post by:
I have a modular set of xml schemas that are being <include/>d into a master schema. The modules have no target namespace, but `inherit' the namespace of the master schema -- this is the so called...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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 project—planning, coding, testing,...

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.