logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

RE: Finding Unique values in a set area??: msg#00004

Subject: RE: Finding Unique values in a set area??
Hi Chad,

It's been a while since the post so I'm not sure if the question is still valid but below is one solution.

Within each Router I can have multiple Device elements and each of them can have one PeerMap element. In each PeerMap can be multiple Peer elements. What I need to do is verify that the LocalViewAddress and VirtualAddress are unique within a PeerMap element, amongst all the Peers. They can be the same if they
are in different Device/PeerMaps.  I've tried a ton of variations of the
following with no success:

  <sch:pattern name="PeerMap Validation">
    <sch:rule context="PeerMap">
      <sch:assert test="count ( //PeerMap [Peer/@VirtualAddress =
current()/Peer/@VirtualAddress] ) = 1" diagnostics="router_id">Peer:
VirtualAddress is not unique!</sch:assert>
      <sch:assert test="child::Peer/@LocalViewAddress"
diagnostics="router_id">Peer: LocalViewAddress is missing!</sch:assert>
      <sch:assert test="child::Peer/@VirtualAddress"
diagnostics="router_id">Peer: VirtualAddress is missing!</sch:assert>
    </sch:rule>
  </sch:pattern>

I've tried changing the context path, the paths in the count arguments with no
success.  Please let me know how I need to fine tune this.

This should work:

<sch:pattern name="Router Validation">
   <sch:rule context="Router/Device/PeerMap">
<sch:assert test="Peer/@LocalViewAddress">Peer: LocalViewAddress is missing!</sch:assert> <sch:assert test="Peer/@VirtualAddress">Peer: VirtualAddress is missing!</sch:assert>
   </sch:rule>
   <sch:rule context="Router/Device/PeerMap/Peer">
<sch:assert test="count(following-sibling::Peer[current()/@LocalViewAddress = @LocalViewAddress]) != 1">LocalViewAddress is not unique within the PeerMap.</sch:assert> <sch:assert test="count(following-sibling::Peer[current()/@VirtualAddress = @VirtualAddress]) != 1">VirtualAddress is not unique within the PeerMap.</sch:assert>
   </sch:rule>
</sch:pattern>

Cheers,
/Eddie


Thanks, chad
____________________________________________________________

Chad Williamson, B.Sc. CE BOW Networks Inc. Software Developer #200, 550-71
Avenue S.E.
TEL: (403) 640-8422 Calgary,
Alberta
FAX: (403) 253-8979 T2H 0S6
e-mail: chad.williamson@xxxxxxxxxxxxxxx
---------------------------------------------------------------------------------------------------------




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Schematron-love-in mailing list
Schematron-love-in@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/schematron-love-in

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.firebase.por...    text.xml.xalan....    qnx.openqnx.dev...    user-groups.zar...    internationaliz...    kde.devel.konve...    finance.e-gold....    emacs.latex.pre...    gis.therion/200...    web.webmin.gene...    yellowdog.gener...    vserver/2003-08...    redhat.release....    sysutils.tivoli...    xfree86.expert/...    mail.becky.user...    hardware.netapp...    netbsd.ports.xe...    python.distutil...    boot-loaders.gr...    culture.interne...    java.springfram...    activedir/2006-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe