Hi Scott,

I can't thank you enough for putting me on to schematron. This is super.

Kate



Scott Hudson <[email protected]> 
04/23/2009 06:32 PM

To
"[email protected]" <[email protected]>
cc
"Hudson, Scott" <[email protected]>, 
"[email protected]" <[email protected]>
Subject
Re: [docbook] A way to restrict the content in xml:id






I'd create a separate schematron file. It should be fairly 
straightforward, something like:
                 <pattern>
                                 <rule context="*...@xml:id]">
                                                 <report id="ID_test"
 test="contains(string-join(text(),''),'_')"
                                                 >xml:id value <value-of 
select="@xml:id"/> must NOT contain 
underscores or capitals as they do not work properly with our build 
tools and outputs. </report>
                                 </rule>
                 </pattern>

I'm not sure about testing for caps, but you may want to visit 
http://schematron.com for more details.

Best regards,

--Scott

> 
> Hi Scott,
> 
> Thanks for the suggestion. Should I be creating a separate schematron 
> file or
> can I edit the schematron that is included in docbook? 
> 
> And can you recommend a good schematron primer?
> 
> Thanks again,
> Kate
> 
> 
> 
> *Scott Hudson <[email protected]>*
> 
> 04/23/2009 02:27 PM
> 
> 
> To
>                "[email protected]" <[email protected]>
> cc
>                "[email protected]" 
<[email protected]>
> Subject
>                Re: [docbook] A way to restrict the content in xml:id
> 
> 
> 
> 
> 
> 
> 
> 
> Hi Kate,
> 
> not via the DTD, but you could run a schematron validation as a
> pre-submission check before the content is sent to the build tools?
> 
> HTH,
> 
> --Scott
> 
> Scott Hudson
> Senior XML Architect
> 
> e: [email protected]
> O: 303.542.2146
> C: 303.332.1883
> F: 303.544.0522
> 
> http://www.FlatironsSolutions.com
> Vision. Experience. Engineering Excellence.
> 
> [email protected] wrote:
>  >
>  > Is there a way to restrict what type of characters are allowed within 
an
>  > xml:id via the DTD?
>  > We have discovered that if our ids have underscores or capitals that
>  > they do not work properly with our build tools
>  > and outputs.
>  >
>  > Thanks,
>  > Kate
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 



Reply via email to