[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: using boolean to compare id numbers

Subject: RE: using boolean to compare id numbers
From: "Ross, Douglas" <DRoss@xxxxxxxxxx>
Date: Thu, 20 Jan 2005 12:44:15 -0500
shell uid
Your if test=" preceding-sibling::user/@name/@uid=@uid" looks
suspicious.

Try: preceding-sibling::user/@uid=@uid
Or if testing for @name is part of it then
Try: preceding-sibling::user[@name]/@uid=@uid

Douglas Ross
Developer, HTML UI Framework
Kronos
E-mail: dross@xxxxxxxxxx
www.kronos.com

-----Original Message-----
From: dan sherman [mailto:h8_bsod@xxxxxxxxx]
Sent: Thursday, January 20, 2005 12:39 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  using boolean to compare id numbers

using the following xsl and xml it returns nothing,
hopefully I am getting close. thanks again

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:exslt="http://exslt.org/common"
 xmlns:math="http://exslt.org/math"
 xmlns:date="http://exslt.org/dates-and-times"
 xmlns:func="http://exslt.org/functions"
 xmlns:set="http://exslt.org/sets"
 xmlns:str="http://exslt.org/strings"
 xmlns:dyn="http://exslt.org/dynamic"
 xmlns:saxon="http://icl.com/saxon"

xmlns:xalanredirect="org.apache.xalan.xslt.extensions.Redirect"
 xmlns:xt="http://www.jclark.com/xt"
 xmlns:libxslt="http://xmlsoft.org/XSLT/namespace"
 xmlns:test="http://xmlsoft.org/XSLT/"
 extension-element-prefixes="exslt math date func set
str dyn saxon xalanredirect xt libxslt test"
 exclude-result-prefixes="math str">

<xsl:output omit-xml-declaration="yes" indent="no"/>
<xsl:param name="inputFile">-</xsl:param>
<xsl:template match="/">
</xsl:template>

 <xsl:template
match="device-list/device/user-info/user">
  <xsl:if
test="preceding-sibling::user/@name/@uid=@uid">
   <xsl:message>oops</xsl:message>
  </xsl:if>


</xsl:template>
</xsl:stylesheet>

---------------xml below----------------------

<user-info>
      <plus-entry file="/etc/passwd"/>
      <plus-entry file="/etc/shadow"/>
      <plus-entry file="/etc/group"/>
      <user name="root" home="/" gecos="Super-User"
shell="/sbin/sh" uid="3" gid="1" has_pass="true"
has_shadow="true" pw-last-change="6445"
pw-min-days="-1" pw-max-days="-1" pw-inactive="-1"
pw-warn="-1" pw-expire="-1"/>
      <user name="daemon" home="/" gecos="" shell=""
uid="1" gid="1" has_pass="false" has_shadow="true"
pw-last-change="6445" pw-min-days="-1"
pw-max-days="-1" pw-inactive="-1" pw-warn="-1"
pw-expire="-1"/>
      <user name="bin" home="/usr/bin" gecos=""
shell="" uid="2" gid="2" has_pass="false"
has_shadow="true" pw-last-change="6445"
pw-min-days="-1" pw-max-days="-1" pw-inactive="-1"
pw-warn="-1" pw-expire="-1"/>
      <user name="sys" home="/" gecos="" shell=""
uid="3" gid="3" has_pass="false" has_shadow="true"
pw-last-change="6445" pw-min-days="-1"
pw-max-days="-1" pw-inactive="-1" pw-warn="-1"
pw-expire="-1"/>
      <user name="adm" home="/var/adm" gecos="Admin"
shell="" uid="4" gid="4" has_pass="false"
has_shadow="true" pw-last-change="6445"
pw-min-days="-1" pw-max-days="-1" pw-inactive="-1"
pw-warn="-1" pw-expire="-1"/>
      <user name="lp" home="/usr/spool/lp" gecos="Line
Printer Admin" shell="" uid="71" gid="8"
has_pass="false" has_shadow="true"
pw-last-change="6445" pw-min-days="-1"
pw-max-days="-1" pw-inactive="-1" pw-warn="-1"
pw-expire="-1"/>
      <user name="uucp" home="/usr/lib/uucp"
gecos="uucp Admin" shell="" uid="5" gid="5"
has_pass="false" has_shadow="true"
pw-last-change="6445" pw-min-days="-1"
pw-max-days="-1" pw-inactive="-1" pw-warn="-1"
pw-expire="-1"/>
      <user name="nuucp" home="/var/spool/uucppublic"
gecos="uucp Admin" shell="/usr/lib/uucp/uucico"
uid="9" gid="9" has_pass="false" has_shadow="true"
pw-last-change="6445" pw-min-days="-1"
pw-max-days="-1" pw-inactive="-1" pw-warn="-1"
pw-expire="-1"/>
      <user name="smmsp" home="/" gecos="SendMail
Message Submission Program" shell="" uid="25" gid="25"
has_pass="false" has_shadow="true"
pw-last-change="6445" pw-min-days="-1"
pw-max-days="-1" pw-inactive="-1" pw-warn="-1"
pw-expire="-1"/>
      <user name="listen" home="/usr/net/nls"
gecos="Network Admin" shell="" uid="37" gid="4"
has_pass="true" has_shadow="true" pw-last-change="-1"
pw-min-days="-1" pw-max-days="-1" pw-inactive="-1"
pw-warn="-1" pw-expire="-1"/>
      <user name="nobody" home="/" gecos="Nobody"
shell="" uid="60001" gid="60001" has_pass="false"
has_shadow="true" pw-last-change="6445"
pw-min-days="-1" pw-max-days="-1" pw-inactive="-1"
pw-warn="-1" pw-expire="-1"/>



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.