Hi Bryan, In a URL you have to specify the protocol, which could be "file", "http", "https", "ftp", etc. The idea is to check that the attribute value actually refers to something that could be a document stored somewhere and not just meaningless plain text. URLs have a well-defined format that could be validated using different regular expressions. I just did a quick check on Google before posting the idea and found that this is something doable. Regards, Rodolfo -- Rodolfo M. Raya <
rmraya@maxprograms.com> Maxprograms
http://www.maxprograms.com >
Original Message----- > From: Schnabel, Bryan S [ mailto:bryan.s.schnabel@tektronix.com ] > Sent: Friday, April 22, 2011 2:16 PM > To: Rodolfo M. Raya; xliff@lists.oasis-open.org > Subject: RE: [xliff] Attributes for XLIFF 2.0 > > I think this is a good goal. It might also be an ambitious goal (assuming we' > want to accommodate the not just http://, but also file:// - and > accommodate the various *flavors* of URL formatting between OS', > browsers, etc.). > > It's certainly do-able to write a durable regex. Just need to try to think of all > the ways the URLs could be expressed, > > file://localhost/etc/mydir/myfile.xml > file:///etc/mydir/myfile.xml > > file://localhost/c /mydir/myfile.xml > file:///c /mydir/myfile.xml > file://localhost/c:/mydir/myfile.xml > file:///c:/mydir/myfile.xml > file://localhost///remotehost/mydir/myfile.xml > file://///remotehost/mydir/myfile.xml > > > . . .to name a few. > > - Bryan > >
Original Message----- > From: Rodolfo M. Raya [ mailto:rmraya@maxprograms.com ] > Sent: Friday, April 22, 2011 7:23 AM > To: xliff@lists.oasis-open.org > Subject: [xliff] Attributes for XLIFF 2.0 > > Hi, > > One of the most common problems in XLIFF is the difficulty to validate > attributes. This is something we can improve a bit in 2.0. > > Attributes that contain a file location, like "original" in <file> or "href" > in <external-file> are supposed to contain the location of a file. We cannot > check whether the file exists, but we can make sure that the location is > written in a standard way. I propose to enforce the use of URLs in XLIFF 2.0 > for attributes that point to files; URL validation can be included in the > schema using regular expressions. > > Opinions? > > Regards, > Rodolfo > -- > Rodolfo M. Raya <rmraya@maxprograms.com> > Maxprograms http://www.maxprograms.com > > > > --------------------------------------------------------------------- > To unsubscribe from this mail list, you must leave the OASIS TC that > generates this mail. Follow this link to all your TCs in OASIS at: > https://www.oasis- > open.org/apps/org/workgroup/portal/my_workgroups.php > >