RE: A couple of questions about using Schematron.
"Chad Williamson" <[email protected]> Mon, 15 Dec 2003 10:36:56 -0700
| Newsgroups | gmane.text.xml.schematron |
|---|---|
| Message-ID | <[email protected]> |
--0__=2lNSLR8k7AlEmLkC1ByJNmUBoA0ma3vsqlgYXdzX48R73vcs7MUfuLYt Content-type: text/plain; charset=us-ascii Content-Disposition: inline Thanks Owen. I changed to schematron-basic.xsl and found that my output is much nicer now :) I haven't been able to find a decent example on the web on how to embed Schematron with XML schema. I would love to see how the namespaces are setup if you happen to have an example. Alternately, is there an easy way in Schematron to validate attributes as to whether they are valid integers, strings, etc? Also, I'm having to use the child:: and parent:: abilities. Unfortunately I don't have a good understanding of how they work. Is there any documentation on using them or examples available detailing what you are allowed to do with them? Thanks, chad "Boyle Owen" <[email protected]> on 15/12/2003 02:06:02 AM To: [email protected] cc: (bcc: Chad Williamson/BOW Software Inc.) Subject: RE: [Schematron-love-in] A couple of questions about using Schematron. --0__=2lNSLR8k7AlEmLkC1ByJNmUBoA0ma3vsqlgYXdzX48R73vcs7MUfuLYt Content-type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-transfer-encoding: quoted-printable > -----Original Message----- > From: Chad Williamson [mailto:[email protected]] > > Good Day All. I'm hoping this list still exists, as I > noticed there is no > archive for 2003. I joined this list a few months ago and yours is about the second posting I've seen on it so it's not exactly humming... About your question 2), I always used the skeleton inside schematron-basic.xsl (it is included) rather than trying to process against it directly... Rgds, Owen Boyle Disclaimer: Any disclaimer attached to this message may be ignored. > > I've just starting playing with Schematron, and really like > it. However, I have > a few things I'm not sure how to do: > > 1) I'm using Xalan for XSLT and the output looks like this: > [c-williamson@c-williamson1 Schematron]$ Xalan test3.xml chad.xsl > <?xml version=3D"1.0" encoding=3D"UTF-8"?> > A 'dog' element should contain two 'ear' elements.This dog > has a bone.A 'dog' > element should contain three elements.This dog has a bone. > > -I would love to get line numbers, does only XT support this? > -Also, is there a way I can get the statements to appear one > per line, like a > newline character I can use? > > 2) I haven't been able to embed XML Schema into my > Schematron. I have large > complicated structures and was hoping not to have to write > rules saying that > element chad must have these 30 attributes in order to validate it. > [c-williamson@c-williamson1 Schematron]$ Xalan -o chad1.xsl chad1.sch= > skeleton1-5.xsl > XSLT message: Warning: unrecognized element xsd:schema, > source tree node: > xsd:schema (file:///home/c-williamson/xml_parser/Schematron/skeleton1-5.xsl, line 486, column 16) -Do I need to use something different than the skeleton1-5.xsl? -Does someone have an example of how to set up the namespaces properly for this? I've tried a few different ways with no success. 3) I've looked through the archive and was a little confused on how I can display in my report the full path to the element or attribute. i.e. Instead of This dog has a bone, it would say: AAA.BBB.CCC.Dog has a bone. 4) How do you use Schematron rules to validate your datatypes like strings having a certain pattern? i.e. String can be 5 characters in length, first two are numbers, last 3 are letters. Thanks for your assistance, chad the rad dad ____________________________________________________________ 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 T2= H 0S6 e-mail: [email protected] -----------------------------------------------------------------------= - --------------------------------- ------------------------------------------------------- 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=3D1278&alloc_id=3D3371&op=3Dclick= _______________________________________________ Schematron-love-in mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/schematron-love-in Diese E-mail ist eine private und pers=F6nliche Kommunikation. Sie hat keinen Bezug zur B=F6rsen- bzw. Gesch=E4ftst=E4tigkeit der SWX Gruppe. = This e-mail is of a private and personal nature. It is not related to the exchange or business activities of the SWX Group. Le pr=E9sent e-mail e= st un message priv=E9 et personnel, sans rapport avec l'activit=E9 boursi=E8= re du Groupe SWX. This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently= and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print,= or copy any part of this message if you are not the intended recipient.= The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company. ------------------------------------------------------- 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 admi= n. Click now! http://ads.osdn.com/?ad_id= --0__=2lNSLR8k7AlEmLkC1ByJNmUBoA0ma3vsqlgYXdzX48R73vcs7MUfuLYt Content-type: text/plain; charset=us-ascii Content-Disposition: inline 78&alloc_id371&oplick _______________________________________________ Schematron-love-in mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/schematron-love-in --0__=2lNSLR8k7AlEmLkC1ByJNmUBoA0ma3vsqlgYXdzX48R73vcs7MUfuLYt-- ------------------------------------------------------- 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